mirror of https://github.com/libsdl-org/SDL
pulseaudio: Require PulseAudio 5.0 or later for SDL3.
This commit is contained in:
parent
9ebf0ed781
commit
6fd0613ac8
|
@ -160,7 +160,7 @@ endmacro()
|
|||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckPulseAudio)
|
||||
if(SDL_PULSEAUDIO)
|
||||
pkg_check_modules(PKG_PULSEAUDIO libpulse-simple>=0.9.15)
|
||||
pkg_check_modules(PKG_PULSEAUDIO libpulse-simple>=5.0)
|
||||
if(PKG_PULSEAUDIO_FOUND)
|
||||
set(HAVE_PULSEAUDIO TRUE)
|
||||
file(GLOB PULSEAUDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/pulseaudio/*.c)
|
||||
|
|
|
@ -190,6 +190,7 @@ static int load_pulseaudio_syms(void)
|
|||
SDL_PULSEAUDIO_SYM(pa_threaded_mainloop_wait);
|
||||
SDL_PULSEAUDIO_SYM(pa_threaded_mainloop_signal);
|
||||
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_cancel);
|
||||
SDL_PULSEAUDIO_SYM(pa_operation_set_state_callback);
|
||||
|
@ -226,15 +227,6 @@ static int load_pulseaudio_syms(void)
|
|||
SDL_PULSEAUDIO_SYM(pa_stream_set_read_callback);
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -320,9 +312,7 @@ static int ConnectToPulseServer(void)
|
|||
return SDL_SetError("pa_threaded_mainloop_new() failed");
|
||||
}
|
||||
|
||||
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) {
|
||||
PULSEAUDIO_pa_threaded_mainloop_free(pulseaudio_threaded_mainloop);
|
||||
|
|
Loading…
Reference in New Issue