From aefdce711b812286f1ca3baeabb19d3bea528aab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Thu, 18 Mar 2021 12:57:28 -0400
Subject: [PATCH] Do what was likely intended by 8b6b7b7c

The previous attempt completely disabled pulse audio.
---
 src/xpdev/xpbeep.c | 20 +++-----------------
 1 file changed, 3 insertions(+), 17 deletions(-)

diff --git a/src/xpdev/xpbeep.c b/src/xpdev/xpbeep.c
index 446acc1400..7d01392337 100644
--- a/src/xpdev/xpbeep.c
+++ b/src/xpdev/xpbeep.c
@@ -414,23 +414,9 @@ DLLCALL xptone_open_locked(void)
 			}
 		}
 		if(pu_api != NULL) {
-			if(!pulseaudio_initialized) {
-				pa_sample_spec ss;
-				ss.format = PA_SAMPLE_U8;
-				ss.rate = 22050;
-				ss.channels = 1;
-				if((pu_handle = pu_api->simple_new(NULL, "XPBeep", PA_STREAM_PLAYBACK, NULL, "Beeps and Boops", &ss, NULL, NULL, NULL)) == NULL)
-					pulseaudio_device_open_failed=TRUE;
-				else
-					pulseaudio_initialized=TRUE;
-				pu_api->simple_free(pu_handle);
-				pu_handle = NULL;
-			}
-			if(pulseaudio_initialized) {
-				handle_type=SOUND_DEVICE_PULSEAUDIO;
-				handle_rc++;
-				return(TRUE);
-			}
+			handle_type=SOUND_DEVICE_PULSEAUDIO;
+			handle_rc++;
+			return(TRUE);
 		}
 	}
 #endif
-- 
GitLab