Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement request: Add Jack support in SDL2 #52753

Open
fdziarmagowski opened this issue Oct 23, 2024 · 1 comment
Open

Enhancement request: Add Jack support in SDL2 #52753

fdziarmagowski opened this issue Oct 23, 2024 · 1 comment

Comments

@fdziarmagowski
Copy link

Please consider adding Jack audio back-end to SDL2 and enable it by default. This is required for environments where Jack server is running and providing an audio interface for applications. Without it SDL2 applications fail to provide sound output to Jack
(SDL audio device opening...failed (Audio subsystem is not initialized))

Proposed patch:

index e7b19fdee97..ed34eba7911 100644
--- a/srcpkgs/SDL2/template
+++ b/srcpkgs/SDL2/template
@@ -18,8 +18,8 @@ distfiles="https://www.libsdl.org/release/SDL2-${version}.tar.gz"
 checksum=2508c80438cd5ff3bbeb8fe36b8f3ce7805018ff30303010b61b03bb83ab9694
 
 # Package build options
-build_options="gles opengl pulseaudio pipewire sndio vulkan wayland x11"
-build_options_default="gles opengl pulseaudio sndio vulkan wayland x11"
+build_options="gles jack opengl pulseaudio pipewire sndio vulkan wayland x11"
+build_options_default="gles jack opengl pulseaudio sndio vulkan wayland x11"
 
 case "$XBPS_TARGET_MACHINE" in
 	ppcle*) ;;
@@ -58,6 +58,13 @@ if [ "$build_option_opengl" -o "$build_option_gles" ]; then
 	makedepends+=" glu-devel"
 fi
 
+if [ "$build_option_pipewire" ]; then
+       configure_args+=" -DSDL_JACK=ON"
+       makedepends+=" jack-devel"
+else
+       configure_args+=" -DSDL_JACK=OFF"
+fi
+
 if [ "$build_option_pulseaudio" ]; then
 	configure_args+=" -DSDL_PULSEAUDIO=ON"
 	makedepends+=" pulseaudio-devel"

Thanks!

@classabbyamp
Copy link
Member

please make a PR for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants