0
0

Is there a way to increase the precision of the return values of FMOD 3.6 (linux) FSOUND_Stream_GetTime? I get about 20 diferent values per econd. Looks like it only takes into account how many 50ms buffer blocks FMOD has sent to the audio device, and does not use ioctls like SNDCTL_DSP_GETOPTR or SNDCTL_DSP_GETODELAY that can be used to determine playback position with byte accuracy (on OSS, iirc ALSA got even better syncronization modes). Our app is blocked on linux by this, because we depend on precise timing to draw the frame (animation is calculated and played in realtime), and now we can only draw 20 different frames per second, even when the hardware is able to draw hundreds.

  • You must to post comments
0
0

i wouldnt rely on the sound system for timing if i were you.
use some os timer methods.

  • You must to post comments
0
0

I should say to use them both.
Just check when the previous value of gettime is not the same as the current value.
At that time, you start your own timer, which will allow you to fill up the milliseconds between two gettime changes.

  • You must to post comments
0
0

I am now using GetTime and gettimeofday(2), and works flawlessly so far. Thanks a lot!

  • You must to post comments
0
0

How does it calculate the time elapsed? using system timer or by its own mechanism?

  • You must to post comments
0
0

FMOD uses high-precision multimedia timers whenever the platform supports them.

  • You must to post comments
0
0

Just to clarify, if the stream is only updated when the mixer is updated, does that mean that the accuracy of FSOUND_STREAM_GETTIME can be anywhere between virtually 0ms and the size of the mix buffer as set by FSOUND_SETBUFFERSIZE ? So if my mix buffer is set to 100ms, FSOUND_STREAM_GETTIME is from 0ms to 100ms earlier than the actual playback time?

Or does the mix buffer size not have anything to do with it?

  • You must to post comments
0
0

[quote="xja":3vnbvrc7]Just to clarify, if the stream is only updated when the mixer is updated, does that mean that the accuracy of FSOUND_STREAM_GETTIME can be anywhere between virtually 0ms and the size of the mix buffer as set by FSOUND_SETBUFFERSIZE ?[/quote:3vnbvrc7]

Correct.

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.