I’m trying to implement voice chat using Steam and Fmod, it works, except there is a significant delay (1-2 seconds) between one person talking and the other person hearing it.
I want to try increasing the buffer size used in the PCMReadCallback, but its doesn’t matter what I set FMOD_CREATESOUNDEXINFO::decodebuffersize to, the max buffer is always 16k.
How can I increase the buffer size?
Also, when reading a 16k buffer it will sometimes be followed by a low size (5-7k) how is the buffer reading working?
- capybara asked 6 years ago
it doesnt ‘do nothing’ – the buffer size is what you set it. This doesnt mean the callback you get is going to be a certain size. Rather than alloc redundant memory, it uses a 16k block and calls the callback multiple times if it needs more data.
If you were writing a voice chat system you’d be using playDSP and a dsp callback for lowest latency anyway, not a large block stream buffer.
Please login first to submit.