[pulseaudio-tickets] [Bug 103498] Closing PulseAudio freezes SDL audio

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Nov 6 18:44:09 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=103498

--- Comment #2 from Jussi Pakkanen <jpakkane at gmail.com> ---
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).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20171106/05efc4af/attachment.html>


More information about the pulseaudio-bugs mailing list