<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Closing PulseAudio freezes SDL audio"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103498#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Closing PulseAudio freezes SDL audio"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103498">bug 103498</a>
from <span class="vcard"><a class="email" href="mailto:jpakkane@gmail.com" title="Jussi Pakkanen <jpakkane@gmail.com>"> <span class="fn">Jussi Pakkanen</span></a>
</span></b>
<pre>Unfortunately the player is closed source. However I managed to reduce it to
the following piece of code:
void* check_audio_freeze(void *_) {
if(SDL_Init(SDL_INIT_AUDIO) < 0) {
printf("SDL_Init: %s\n", SDL_GetError());
return NULL;
}
int flags = MIX_INIT_OGG;
int initted = Mix_Init(flags);
if((initted&flags) != flags) {
goto sdl_deinit;
}
if(Mix_OpenAudio(44100, AUDIO_S16, 2, 512) < 0) {
printf("Mix_OpenAudio: %s\n", Mix_GetError());
goto mix_deinit;
}
Mix_AllocateChannels(64);
Mix_CloseAudio();
mix_deinit:
Mix_Quit();
sdl_deinit:
SDL_Quit();
return NULL;
}
Once Pulseaudio has frozen, even new executables (such as the one above) will
freeze when trying to deinitialize the sound system.
I also forgot to mention that this is a semi-embedded Linux distribution that
runs PA in system mode. I have tried to reproduce this issue on a stock distro
but thus far has been unsuccessfull (but the bug happens very rarely even on
the custom distro).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>