diff --git a/src/xpdev/GNUmakefile b/src/xpdev/GNUmakefile
index b11d58f70861122b591a017e21c8621153fe6704..a60fa9b42c4e6f120acb7ba3fa45ffffb62c90ea 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 e91927deb50c7c5fddd2a65e28d47e76cfff917f..fb7e27f1df89b1c742a21be0d6d5a2fa3fef954a 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)