On gentoo, the sound in libsdl2 is enabled at installation time via USE flags. It is no USE flag for jack, which imply the jack support will be enabled by configure if it find it. On my system I get:
SDL2 Configure Summary: Building Shared Libraries Enabled modules : atomic audio video render events joystick haptic sensor power filesystem threads timers file loadso cpuinfo assembly Assembly Math : mmx sse sse2 sse3 Audio drivers : disk dummy alsa jack(dynamic) Video drivers : dummy x11 opengl X11 libraries : xcursor xdbe xinerama xinput2 xinput2_multitouch xrandr xshape xvidmode Input drivers : linuxev linuxkd Using libsamplerate : YES Using libudev : YES Using dbus : YES Using ime : YES Using ibus : NO Using fcitx : NO >>> Source configured.
Also, with my audio setup, the default alsa card, a virtual one, is redirected into jack via the jack ALSA plugin. This seam to confuse sdl which insist to use the alsa default card even when jackd is running. I find a workaround; it is to set the SDL_AUDIODRIVER variable:
Or maybe it is no other way to tell libsdl to use jack audio when other audio drivers are compiled in.
I want to fix that ebuild. For that, I need to know the difference between “alsa jack” and “alsa(dynamic) jack(dynamic)”.