pulseaudio: Revert "pulseaudio: Require PulseAudio 5.0 or later for SDL3."
This reverts commit 6fd0613ac8
.
Turns out that the Steam Runtime is still on PulseAudio 1.1, and the only
thing we (currently) need a newer Pulse for is pa_threaded_mainloop_set_name,
so let's just go back to treating that symbol as optional.
We might need to force a higher version at some point, but it's not worth it
over this.
main
parent
4db2b968af
commit
280c2c1d7d
|
@ -162,7 +162,7 @@ endmacro()
|
||||||
# - HAVE_SDL_LOADSO opt
|
# - HAVE_SDL_LOADSO opt
|
||||||
macro(CheckPulseAudio)
|
macro(CheckPulseAudio)
|
||||||
if(SDL_PULSEAUDIO)
|
if(SDL_PULSEAUDIO)
|
||||||
set(PulseAudio_PKG_CONFIG_SPEC "libpulse>=5.0")
|
set(PulseAudio_PKG_CONFIG_SPEC "libpulse>=0.9.15")
|
||||||
pkg_check_modules(PC_PULSEAUDIO IMPORTED_TARGET ${PulseAudio_PKG_CONFIG_SPEC})
|
pkg_check_modules(PC_PULSEAUDIO IMPORTED_TARGET ${PulseAudio_PKG_CONFIG_SPEC})
|
||||||
if(PC_PULSEAUDIO_FOUND)
|
if(PC_PULSEAUDIO_FOUND)
|
||||||
set(HAVE_PULSEAUDIO TRUE)
|
set(HAVE_PULSEAUDIO TRUE)
|
||||||
|
|
|
@ -188,7 +188,6 @@ static int load_pulseaudio_syms(void)
|
||||||
SDL_PULSEAUDIO_SYM(pa_threaded_mainloop_wait);
|
SDL_PULSEAUDIO_SYM(pa_threaded_mainloop_wait);
|
||||||
SDL_PULSEAUDIO_SYM(pa_threaded_mainloop_signal);
|
SDL_PULSEAUDIO_SYM(pa_threaded_mainloop_signal);
|
||||||
SDL_PULSEAUDIO_SYM(pa_threaded_mainloop_free);
|
SDL_PULSEAUDIO_SYM(pa_threaded_mainloop_free);
|
||||||
SDL_PULSEAUDIO_SYM(pa_threaded_mainloop_set_name);
|
|
||||||
SDL_PULSEAUDIO_SYM(pa_operation_get_state);
|
SDL_PULSEAUDIO_SYM(pa_operation_get_state);
|
||||||
SDL_PULSEAUDIO_SYM(pa_operation_cancel);
|
SDL_PULSEAUDIO_SYM(pa_operation_cancel);
|
||||||
SDL_PULSEAUDIO_SYM(pa_operation_set_state_callback);
|
SDL_PULSEAUDIO_SYM(pa_operation_set_state_callback);
|
||||||
|
@ -225,6 +224,15 @@ static int load_pulseaudio_syms(void)
|
||||||
SDL_PULSEAUDIO_SYM(pa_stream_set_read_callback);
|
SDL_PULSEAUDIO_SYM(pa_stream_set_read_callback);
|
||||||
SDL_PULSEAUDIO_SYM(pa_context_get_server_info);
|
SDL_PULSEAUDIO_SYM(pa_context_get_server_info);
|
||||||
|
|
||||||
|
/* optional */
|
||||||
|
#ifdef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC
|
||||||
|
load_pulseaudio_sym("pa_threaded_mainloop_set_name", (void **)(char *)&PULSEAUDIO_pa_threaded_mainloop_set_name);
|
||||||
|
#elif (PA_PROTOCOL_VERSION >= 29)
|
||||||
|
PULSEAUDIO_pa_threaded_mainloop_set_name = pa_threaded_mainloop_set_name;
|
||||||
|
#else
|
||||||
|
PULSEAUDIO_pa_threaded_mainloop_set_name = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,7 +318,9 @@ static int ConnectToPulseServer(void)
|
||||||
return SDL_SetError("pa_threaded_mainloop_new() failed");
|
return SDL_SetError("pa_threaded_mainloop_new() failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
PULSEAUDIO_pa_threaded_mainloop_set_name(pulseaudio_threaded_mainloop, "PulseMainloop");
|
if (PULSEAUDIO_pa_threaded_mainloop_set_name) {
|
||||||
|
PULSEAUDIO_pa_threaded_mainloop_set_name(pulseaudio_threaded_mainloop, "PulseMainloop");
|
||||||
|
}
|
||||||
|
|
||||||
if (PULSEAUDIO_pa_threaded_mainloop_start(pulseaudio_threaded_mainloop) < 0) {
|
if (PULSEAUDIO_pa_threaded_mainloop_start(pulseaudio_threaded_mainloop) < 0) {
|
||||||
PULSEAUDIO_pa_threaded_mainloop_free(pulseaudio_threaded_mainloop);
|
PULSEAUDIO_pa_threaded_mainloop_free(pulseaudio_threaded_mainloop);
|
||||||
|
|
Loading…
Reference in New Issue