I’m writing a voice conversation system which uses UDP to send audio to clients. I’m running Win32, VC++ and fmod 3.6.
I play audio using a stream created with FSOUND_Stream_Create() and the stream buffer is 1152 samples at 16 bit mono. Each connected client has an audio channel, a stream and callback function which fills the buffer if there’s audio from the client and calls FSOUND_SetPaused() if there no more data.
As long as only one client is playing it works fine but when there’s being played on two channels it sounds distorted even though one of the client’s sound is silent.
I’m can’t figure out why the sound is being distorted. I’m running on a 10MBit hub and use variable frequency for each user to compensate for variations in Hz.
I’m suspecting the FSOUND_SetPaused which I call from within the callback function when there’s no more data and unpause from another function when there’s new data. Is there a better way to pause the stream until new data arrives?
- bear101 asked 14 years ago
- You must login to post comments
Please login first to submit.