VirtualBox

Opened 13 months ago

Closed 9 months ago

#21575 closed enhancement (fixed)

Also use PulseAudio by default when pipewire-pulse is running

Reported by: Aroun Owned by: pentagonik
Component: audio Version: VirtualBox-7.0.6
Keywords: audio pulseaudio pipewire Cc:
Guest type: all Host type: Linux

Description

This patch allows to use PulseAudio by default when pipewire-pulse is running, which is the pipewire in-place replacement for pulseaudio process. Instead of falling-back to ALSA.

diff --git a/src/VBox/Main/xml/Settings.cpp b/src/VBox/Main/xml/Settings.cpp
index 046ae0d..0c99559 100644
--- a/src/VBox/Main/xml/Settings.cpp
+++ b/src/VBox/Main/xml/Settings.cpp
@@ -8933,7 +8933,8 @@ AudioDriverType_T MachineConfigFile::getHostDefaultAudioDriver()
     {
 # ifdef VBOX_WITH_AUDIO_PULSE
         /* Check for the pulse library & that the pulse audio daemon is running. */
-        if (RTProcIsRunningByName("pulseaudio") &&
+        if (RTProcIsRunningByName("pulseaudio") ||
+           RTProcIsRunningByName("pipewire-pulse") &&
             RTLdrIsLoadable("libpulse.so.0"))
             s_enmLinuxDriver = AudioDriverType_Pulse;
         else

Change History (4)

comment:1 by Aroun, 13 months ago

Hum, actually, if the left part of the OR is true, then I think the && will not be evaluated, so we should add parenthesis

diff --git a/src/VBox/Main/xml/Settings.cpp b/src/VBox/Main/xml/Settings.cpp
index 046ae0d..0c99559 100644
--- a/src/VBox/Main/xml/Settings.cpp
+++ b/src/VBox/Main/xml/Settings.cpp
@@ -8933,7 +8933,8 @@ AudioDriverType_T MachineConfigFile::getHostDefaultAudioDriver()
     {
 # ifdef VBOX_WITH_AUDIO_PULSE
         /* Check for the pulse library & that the pulse audio daemon is running. */
-        if (RTProcIsRunningByName("pulseaudio") &&
+        if ((RTProcIsRunningByName("pulseaudio") ||
+           RTProcIsRunningByName("pipewire-pulse")) &&
             RTLdrIsLoadable("libpulse.so.0"))
             s_enmLinuxDriver = AudioDriverType_Pulse;
         else

comment:2 by pentagonik, 12 months ago

Owner: set to pentagonik
Status: newassigned

comment:3 by pentagonik, 12 months ago

Thanks for the patch! This will be available in the next upcoming maintenance version.

comment:4 by galitsyn, 9 months ago

Resolution: fixed
Status: assignedclosed

Hello,

We just released VirtualBox 7.0.10. This issue should be fixed in this release. Culd you please give it a try? Packages are available on our downloads page.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use