[SDL] SDL env var for audio buffer size?

Bill Kendrick nbs at sonic.net
Sat Oct 9 14:39:18 PDT 2004


SDL has some environment variables which can be set to tell SDL what
video driver to use, right?

Has anyone thought of providing a variable to allow the user to set their
preferred audio buffer size?


In Tux Paint, for example, we're currently using this:

#ifndef WIN32
          if (Mix_OpenAudio(44100, AUDIO_S16, 2, 1024) < 0)
#else
            if (Mix_OpenAudio(44100, AUDIO_S16, 2, 2048) < 0)
#endif


Which seems to work fine for most people.  However, one person has reported
that audio on one computer running XP sounds terrible in Tux Paint
(and in another SDL-based app which happened to be written in Python,
so they were able to quickly and easily change the setting to find the
best value).


While I could add an "--audiobuffersize" option, or some-such, I wonder
if maybe SDL would benefit from having an $SDL_AUDIO_BUFFER_SIZE env.
variable which would allow users to tweak it without having to do it for
/every/ application...?


Comments? :)

-bill!
bill at newbreedsoftware.com                            New Breed Software
http://www.newbreedsoftware.com/       Tux Paint 0.9.14 -- Coming soon!




More information about the SDL mailing list