[SDL] ALSA/OSS linux audio driver priorities

René Dudfield renesd at gmail.com
Thu Aug 9 16:09:32 PDT 2007


Hello,

this is seen a lot by people who use pygame too.  On windows, and linux.

Sometimes the fix is to increase the buffer size before initialising
sdl_mixer.  This works for 99% of people, but then of course the
latency of the sounds goes up.

After a lot of 1024 * 3 seems to be the minimum size which stops the
crackling for most people.

Maybe the sound thread could use a higher priority?

Or maybe there's something else that can be done to feed the data
through more efficiently.

I don't have a computer which has this behaviour, so I've never really
been able to dig into it.

It's a fairly common problem, mainly on windows machines with on board
integrated sound cards.  I don't recall hearing about win98 problems,
I think only xp/2000.  As the code was probably written with win95/98
in mind, that could explain the problem.  Other sound programs on the
machine do not have the crackling.



On 8/10/07, Laurent Moussault <moussault.laurent at free.fr> wrote:
> Hello,
>
> This is my first post on the list, so I'd like first to thank Sam
> Latinga (and everyone else) for this great library!
>
> Ryan C. Gordon wrote:
> > It seems strange that it's only when you change the volume in the
> > game...that sounds like it would have to be an SDL_mixer bug, but I'm
> > wondering if that part is bogus.
>
> Since a few months I'm a contributor to the game Neverball, and this
> "audio crackling bug" is something we have encountered too.
>
> The interesting point is that some of our players have a similar problem
> on _windows_: audio crackling that disappear when setting the volume to
> 100%. If this is the same bug, this would suggest that it's not directly
> related to alsa.
>
> Here's a link to a thread in the Neverball forum discussing the audio
> crackling:
>
> http://www.nevercorner.net/forum/viewtopic.php?pid=10806#p10806
>
> This was a few months ago, but I can bring back the subject on the forum
> if you want more precisions. What kind of information would be useful?
>
> regards,
>
> -- Lorant
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>


More information about the SDL mailing list