Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160405090
D34326.id103018.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D34326.id103018.diff
View Options
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Devices_Audio_DrvHostAudioOss.cpp b/emulators/virtualbox-ose/files/patch-src_VBox_Devices_Audio_DrvHostAudioOss.cpp
--- /dev/null
+++ b/emulators/virtualbox-ose/files/patch-src_VBox_Devices_Audio_DrvHostAudioOss.cpp
@@ -0,0 +1,52 @@
+--- ./src/VBox/Devices/Audio/DrvHostAudioOss.cpp.orig 2022-02-20 08:57:20.835126000 -0600
++++ ./src/VBox/Devices/Audio/DrvHostAudioOss.cpp 2022-02-20 09:53:04.940588000 -0600
+@@ -25,6 +25,7 @@
+ #include <sys/mman.h>
+ #include <sys/soundcard.h>
+ #include <unistd.h>
++#include <stdlib.h>
+
+ #include <iprt/alloc.h>
+ #include <iprt/thread.h>
+@@ -112,9 +113,9 @@
+ * Global Variables *
+ *********************************************************************************************************************************/
+ /** The path to the output OSS device. */
+-static char g_szPathOutputDev[] = "/dev/dsp";
++static const char *g_szPathOutputDev = "/dev/dsp";
+ /** The path to the input OSS device. */
+-static char g_szPathInputDev[] = "/dev/dsp";
++static const char *g_szPathInputDev = "/dev/dsp";
+
+
+
+@@ -191,7 +192,7 @@
+ pBackendCfg->cMaxStreamsIn = 0;
+ pBackendCfg->cMaxStreamsOut = 0;
+
+- int hFile = open("/dev/dsp", O_WRONLY | O_NONBLOCK, 0);
++ int hFile = open(g_szPathOutputDev, O_WRONLY | O_NONBLOCK, 0);
+ if (hFile == -1)
+ {
+ /* Try opening the mixing device instead. */
+@@ -929,6 +930,7 @@
+ RT_NOREF(pCfg, fFlags);
+ PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
+ PDRVHSTAUDOSS pThis = PDMINS_2_DATA(pDrvIns, PDRVHSTAUDOSS);
++ const char *devDsp;
+ LogRel(("Audio: Initializing OSS driver\n"));
+
+ /*
+@@ -959,6 +961,12 @@
+ pThis->IHostAudio.pfnStreamPlay = drvHstAudOssHA_StreamPlay;
+ pThis->IHostAudio.pfnStreamGetReadable = drvHstAudOssHA_StreamGetReadable;
+ pThis->IHostAudio.pfnStreamCapture = drvHstAudOssHA_StreamCapture;
++ devDsp = getenv("VBOX_OSS_INPUT_DEVICE");
++ if (devDsp != NULL)
++ g_szPathInputDev = devDsp;
++ devDsp = getenv("VBOX_OSS_OUTPUT_DEVICE");
++ if (devDsp != NULL)
++ g_szPathOutputDev = devDsp;
+
+ return VINF_SUCCESS;
+ }
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jun 25, 4:32 AM (20 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34304337
Default Alt Text
D34326.id103018.diff (2 KB)
Attached To
Mode
D34326: Add VBOX_OSS_INPUT_DEVICE and VBOX_OSS_OUTPUT_DEVICE to VirtualBox
Attached
Detach File
Event Timeline
Log In to Comment