No subject
Wed Jan 24 21:54:03 PST 2007
the call to Mix_OpenAudio in a separate thread? What /dev does this call =
use?
=20
Program received signal SIGINT, Interrupt.
0x10191954 in __syscall_rt_sigsuspend ()
(gdb) where
#0 0x10191954 in __syscall_rt_sigsuspend ()
#1 0x101916fc in sigsuspend ()
#2 0x100e0620 in __pthread_wait_for_restart_signal ()
#3 0x100dfcf8 in pthread_create ()
#4 0x101573b0 in SDL_SYS_CreateThread (thread=3D0x1044eb28, args=3D0x1044e=
e50)
at SDL_systhread.c:99
#5 0x10157200 in SDL_CreateThread (fn=3D0x10144e10 <SDL_RunAudio>,
data=3D0x10446a08) at SDL_thread.c:267
#6 0x1014569c in SDL_OpenAudio (desired=3D0x7ffffc38, obtained=3D0x102e139=
0)
at SDL_audio.c:478
#7 0x100fd148 in Mix_OpenAudio (frequency=3D-4, format=3D8, nchannels=3D21=
47482200,
chunksize=3D8) at mixer.c:277
#8 0x1001be5c in SoundManager::SoundManager (this=3D0x1044677c)
at SoundManager.cpp:45
#9 0x1001bd38 in SoundManager::Instance () at SoundManager.cpp:24
#10 0x1000b298 in TPI4PHAL::init ()
#11 0x10010594 in App::run (this=3D0x10316f94) at App.cpp:170
#12 0x10005a2c in main ()
#13 0x1018cec4 in __libc_start_main ()
(gdb)
=20
The code in question follows:
=20
m_idCount =3D 1;
int audio_rate =3D 22050;
Uint16 audio_format =3D AUDIO_S16; /* 16-bit stereo */
int audio_channels =3D 2;
int audio_buffers =3D 4096;
=20
// start SDL with audio support
if (SDL_Init(SDL_INIT_AUDIO)=3D=3D-1) {
DiagMsg(oidMisc, emSeverityError, "SDL_Init: %s", SDL_GetError());
return;
}
// open 44.1KHz, signed 16bit, system byte order, stereo audio,
// using 1024 byte chunks
// if (Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 1024)=3D=3D-1) {
if(Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers)=
) {
DiagMsg(oidMisc, emSeverityError, "Mix_OpenAudio: %s\n", Mix_GetError()=
);
return;
}
=20
-TIA
p.s I am not currently subscribed to the mailing list so please reply =
personally.
=20
=20
More information about the SDL
mailing list