[SDL] Sound "pops" in SDL_Mixer -- any ideas for a fix?

Forest Hale havoc at ghdigital.com
Thu Jul 28 22:56:48 PDT 2011

This sounds more like a loading issue to me - perhaps the resampling code is reading past the end of the sound and getting garbage data at the end for one sampleframe (or reading before the beginning)?

Perhaps the sound is being padded at load with extra sampleframes that are uninitialized?

If it was consistent I would be saying the sound may have a misaligned baseline value or miss a proper lead-in/lead-out (if the start and end are not at 0 amplitude, you can get pops).

On 07/28/2011 10:50 PM, Beoran wrote:
> Popping sounds may be a symptom of your chunksize being too small when you call
> int Mix_OpenAudio(int frequency, Uint16 format, int channels, int chunksize).
> How big is your chunksize? You may want to increase it to, say 4096 or even more.
> Also, what OS are you on? On Linux, a badly configured sound server can cause latency
> and popping sounds.
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass
"A game is a series of interesting choices." - Sid Meier

More information about the SDL mailing list