FMOD playSound latency

Started by
17 comments, last by swifty666 13 years, 4 months ago
Huh? setDSPBufferSize () shouldn't affect playback latency. It's for effects processing (echo, compressors, pitching etc..) and usually it's the other way around anyway, if you increase the buffer size you get more latency, not less. But still, if you're not using DSP effects you won't see any difference.

I assume you've asked on the FMOD forums already? At least two years ago, they were read by the developers and they gave their input very often.
Advertisement
And you're playing a wav? not something that needs decoding?
Yep, a wav file, 4KB :).
Quote:Original post by Telastyn
And you're playing a wav? not something that needs decoding?


It doesn't matter. He gets latency after the playSound () call, not after loading it which is when FMOD will decompress it (unless it's streaming).

I reckon on making a simple effort to time the latency, its about 80ms..

according to this topic
http://www.fmod.org/forum/viewtopic.php?t=13451

and the equation fmod gives, i should be getting a latency between 0ms and 10.6 ms when using a buffer size of 512 and 2 buffers.. :|
perhaps i'm being way too picky i dunno. I just dislike the fact that i'm quite aware that the sound isnt when i press a key; its a tiny, but noticeable bit later. hmm
You could look into passing the FMOD_CREATESOUNDEXINFO into the sound creation function. Then modify the passed in FMOD_CREATESOUNDEXINFO::decodebuffersize.
Quote:Original post by KulSeran
You could look into passing the FMOD_CREATESOUNDEXINFO into the sound creation function. Then modify the passed in FMOD_CREATESOUNDEXINFO::decodebuffersize.


It's only valid for streaming buffers.

80 ms is too much and not what I'm seeing on my end. The OP should really ask the FMOD guys, they might know.

I have posted on the fmod forums now and still await replies from those guys, but in the meantime, I have some further info now that maybe will spark some ideas from someone..

I have found that the delay differs a lot from PC to PC, I have found that on my housemate's PC who has a "VIA High Definition" driver (OnBoard), and my mini laptop which has a "IDT High Definition Audio" (OnBoard) the delay is massivly better and very difficult to notice, vs my "Creative SB X-Fi" (SoundCard) which is still around 80ms or so.

I can only assume that the delay is caused by interfacing to the hardware, and that fmod is sending sound data as and when playing a sound, any ideas on how I can make sure the soundcard is primed with the data ready for play upon human input?

I suppose it's not really overly surprising that the simpler the sound device, the lower the latency, but there must be a way to control a fully hardware capable sound device properly to improve this, otherwise no one would want a sound card if it meant all their games played with noticeable sound delays and videos with lip-sync issues! [smile]

This topic is closed to new replies.

Advertisement