Yes, i do this in a DSP callback, the user can retrieve the exact time elapsed by setting his function callback.
I seek in samples then i convert the current sample position to ms, for now this method works for modules, ogg, mp3, flac, mpc, aac and formats supported by libsndfile.
[quote="KarLKoX":37baqmri]It is possible to get the time by converting the samples processed to a relative time (see the sourcecode of the FMOD addon)[/quote:37baqmri]
Chris, I am doing just what you suggest but, as you pointed out, that is not the currently playing time but the decoded time. I discovered that I needed to decode a lot of samples at a time to feed fmod reliably – so the time jumps in ~ 2 sec increments.
My thought is that the stream started at a particular time and there is no technical reason (as far as I know) that fmod could not return the current time….it should have all the information it needs to do so.
[quote="KarLKoX":3ce02kzr]You can calculate the processed sample in the mix time so before the sound is sent to the soundcard, this is how i do in my crappy sound lib with success.[/quote:3ce02kzr]
Never thought of that ! 😀 You mean just in a DSP-callback???
But is it possible to get the current MS if you just seeked??
Please login first to submit.