From aaaeec3a59ef2c4833e9634555b79d5660b3c85f Mon Sep 17 00:00:00 2001 From: deuce <> Date: Thu, 14 May 2020 11:05:36 +0000 Subject: [PATCH] Fix pulseaudio build. --- src/xpdev/GNUmakefile | 6 +++--- src/xpdev/xpbeep.c | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/xpdev/GNUmakefile b/src/xpdev/GNUmakefile index b11d58f708..a60fa9b42c 100644 --- a/src/xpdev/GNUmakefile +++ b/src/xpdev/GNUmakefile @@ -9,9 +9,9 @@ ifneq ($(os),win32) endif ifndef NO_PULSEAUDIO - ifeq ($(shell command -v pkg-config > /dev/null && pkg-config --exists libpulse && echo 'YES'),YES) - CFLAGS += -DWITH_PULSEAUDIO `pkg-config libpulse --cflags` - MT_CFLAGS += -DWITH_PULSEAUDIO `pkg-config libpulse --cflags` + ifeq ($(shell command -v pkg-config > /dev/null && pkg-config --exists libpulse-simple && echo 'YES'),YES) + CFLAGS += -DWITH_PULSEAUDIO `pkg-config libpulse-simple --cflags` + MT_CFLAGS += -DWITH_PULSEAUDIO `pkg-config libpulse-simple --cflags` endif endif diff --git a/src/xpdev/xpbeep.c b/src/xpdev/xpbeep.c index e91927deb5..fb7e27f1df 100644 --- a/src/xpdev/xpbeep.c +++ b/src/xpdev/xpbeep.c @@ -389,7 +389,7 @@ DLLCALL xptone_open_locked(void) if(!pulseaudio_device_open_failed) { if(pu_api==NULL) { dll_handle dl=NULL; - const char *libnames[]={"pulse",NULL}; + const char *libnames[]={"pulse-simple",NULL}; if(((pu_api=(struct pulseaudio_api_struct *)malloc(sizeof(struct pulseaudio_api_struct)))==NULL) || ((dl=xp_dlopen(libnames,RTLD_LAZY,0))==NULL) || ((pu_api->simple_new=xp_dlsym(dl,pa_simple_new))==NULL) @@ -418,7 +418,7 @@ DLLCALL xptone_open_locked(void) pulseaudio_initialized=TRUE; } if(pulseaudio_initialized) { - handle_type=SOUND_DEVICE_PORTAUDIO; + handle_type=SOUND_DEVICE_PULSEAUDIO; handle_rc++; return(TRUE); } @@ -815,6 +815,7 @@ do_xp_play_sample(const unsigned char *sampo, size_t sz, int *freed) int i; #endif +printf("Handle: %d\n", handle_type); #ifdef WITH_PORTAUDIO if(handle_type==SOUND_DEVICE_PORTAUDIO) { if(pa_api->ver < 1899) -- GitLab