Recently, programs which attempt to use SDL 1.1.8 audio seem to be
freezing on calling SDL_OpenAudio() – no error messages, just stone-cold.
kill -9 is required to stop the errant process. Here is an example piece
of code, from prboom 2.1.2 (see http://prboom.sourceforge.net/ ):--------------------------------------------------------------------------
SDL_AudioSpec audio;
// Secure and configure sound device first.
fprintf( stderr, "I_InitSound: ");
// Open the audio device
audio.freq = SAMPLERATE;
#if ( SDL_BYTEORDER == SDL_BIG_ENDIAN )
audio.format = AUDIO_S16MSB;
#else
audio.format = AUDIO_S16LSB;
#endif
audio.channels = 2;
audio.samples = SAMPLECOUNT;
audio.callback = I_UpdateSound;
if ( SDL_OpenAudio(&audio, NULL) < 0 ) {
fprintf(stderr, “couldn’t open audio with desired format\n”);
return;
}
SAMPLECOUNT = audio.samples;
fprintf(stderr, " configured audio device with %d samples/slice\n",
SAMPLECOUNT);
Frankly, I’m baffled. How can I figure out what SDL isn’t getting along
with so as to alleviate the problem?
Matthew W. Miller – @Matthew_W_Miller