SDL audio and AIO hogging each other's signals
Quoted 15 lines · ---- andrzej zaborowski
Hi,
withQEMU_AUDIO_DRVset to "sdl" and booting from CD-ROM with AIO on
a Linux host and with SDL 1.2.11, qemu locks up insigwait()(the main thread) andSDL_SemWait()(the audio thread) as soon as music is playing and CD-ROM is being read at the same time. It appears that audio/sdlaudio.c:sdl_callback is called by SDL when it shouldn't be called, andblock-raw.cis trying to flush the AIO operations, so it would seem that the SIGUSR2 which is intended to wake up the sigwait is instead captured by SDL and SDL tries to be smart and callssdl_callback.sdl_callbackhas a sanity check but this check is *after*SDL_SemWait()so it is not triggered. The strange thing is that using a different signal (tried SIGUSR1 and SIGPOLL) for AIO doesn't help. Does SDL catch all signals?
I could be totally wrong because I don't know SDLAudio at all.
Quoted 1 line
Any ideas about the exact reason why this is happening and how to fix it?
On Solaris 10/11 x86, I was seeing a bunch of semphore errors emitted from SDL when using SDL audio.
I'll track this down and report back.
Ben