I have an anoying problem when playing a .pcm file as a stream and using direct sound. If the stream callback is set to about 40 ms then I start hearing clicking sounds while playing the stream. If I instead use normal Windows sound then there’s no clicking sounds and I can even set the stream callback at about 20 ms and there’s still no clicking. The .pcm file is being played at 32 KHz in mono. (I’m testing FMOD for VoIP that’s why I need a very low stream callback)
- bear101 asked 13 years ago
There’s no clicking on my old SB16 but it doesn’t support HW3D. Unfortunately I don’t have other HW3D cards but others have also complained that they hear clicking If I remove FSOUND_HW3D or replace it with FSOUND_HW2D the clicking disappears.
You can try my sample application. It can be downloaded here: [url:1wxfax7i]http://www.bearware.dk/temp/FMODposition.zip[/url:1wxfax7i]. Compile and press play. If you also hear clicking you can try and open the file FMODule.cpp and locate the function “int FMODule::BeginStream” and comment out FSOUND_HW3D and then comple and play it again.
When the sample callback is greater than 60 ms there’s no clicking. In the sample application you can e.g. press Stop and set the callback to 1800 samples and then press play again, then the clicking disappears.
It doesn’t look like a bufferunderrun problem because if you uncomment the TRACE() in the “BOOL CFMODpositionDlg::StreamCallback(void* pBuf, int nLen)” function you’ll see that the callback occurs within the specified time
I’m using FMOD 3.71 and I create the stream in the following way:
nSamplesForCallback*2, //in bytes
Once the stream callback is set at about 40 ms (I’m playing a sample at 32 KHz and using a 1280 samples callback) it starts clicking when FMOD is init’ed with FSOUND_OUTPUT_DSOUND. Now I, however, found that if I don’t include FSOUND_HW3D when creating the stream then the clicking disappears. That also explains why there was no clicking when I init’ed FMOD with FSOUND_OUTPUT_WINMM, since my driver doesn’t support HW3D for WINMM (while it’s supported by my DSOUND driver, btw it’s a SBLive).
I’ve tried to time every callback when the clicking occurs using ::GetTickCount() and it doesn’t look like a bufferunderrun since the callback occur within the specified 40 ms.
Please login first to submit.