svn commit: r568418 - in head/emulators/virtualbox-ose-legacy: . files
Guido Falsi
madpilot at FreeBSD.org
Sun Mar 14 21:44:14 UTC 2021
Author: madpilot
Date: Sun Mar 14 21:44:13 2021
New Revision: 568418
URL: https://svnweb.freebsd.org/changeset/ports/568418
Log:
Add patch to fix OSS audio to virtualbox-ose-legacy
PR: 237472
Submitted by: Martin Birgmeier <d8zNeCFG at aon.at>
Added:
head/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp (contents, props changed)
Modified:
head/emulators/virtualbox-ose-legacy/Makefile
Modified: head/emulators/virtualbox-ose-legacy/Makefile
==============================================================================
--- head/emulators/virtualbox-ose-legacy/Makefile Sun Mar 14 20:45:24 2021 (r568417)
+++ head/emulators/virtualbox-ose-legacy/Makefile Sun Mar 14 21:44:13 2021 (r568418)
@@ -3,7 +3,7 @@
PORTNAME= virtualbox-ose
PORTVERSION= 5.2.44
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= emulators
MASTER_SITES= https://download.oracle.com/virtualbox/${PORTVERSION}/
PKGNAMESUFFIX?= -legacy
Added: head/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp Sun Mar 14 21:44:13 2021 (r568418)
@@ -0,0 +1,32 @@
+--- src/VBox/Devices/Audio/DrvHostOSSAudio.cpp.orig 2020-07-09 16:52:47 UTC
++++ src/VBox/Devices/Audio/DrvHostOSSAudio.cpp
+@@ -248,11 +248,11 @@ static int ossStreamOpen(const char *pszDev, int fOpen
+ break;
+
+ default:
+- rc = VERR_AUDIO_STREAM_COULD_NOT_CREATE;
++ iFormat = -1;
+ break;
+ }
+
+- if (RT_FAILURE(rc))
++ if (RT_UNLIKELY(iFormat == -1))
+ break;
+
+ if (ioctl(hFile, SNDCTL_DSP_SAMPLESIZE, &iFormat))
+@@ -660,6 +660,7 @@ static int ossCreateStreamIn(POSSAUDIOSTREAM pStreamOS
+
+ pCfgAcq->Backend.cfPeriod = PDMAUDIOSTREAMCFG_B2F(pCfgAcq, ossAcq.cbFragmentSize);
+ pCfgAcq->Backend.cfBufferSize = pCfgAcq->Backend.cfPeriod * 2; /* Use "double buffering". */
++ pCfgAcq->Backend.cfPreBuf = pCfgAcq->Backend.cfBufferSize;
+ /** @todo Pre-buffering required? */
+ }
+ }
+@@ -778,6 +779,7 @@ static int ossCreateStreamOut(POSSAUDIOSTREAM pStreamO
+ #endif
+ pCfgAcq->Backend.cfPeriod = PDMAUDIOSTREAMCFG_B2F(pCfgAcq, obtStream.cbFragmentSize);
+ pCfgAcq->Backend.cfBufferSize = pCfgAcq->Backend.cfPeriod * 2; /* Use "double buffering" */
++ pCfgAcq->Backend.cfPreBuf = pCfgAcq->Backend.cfBufferSize;
+ }
+
+ } while (0);
More information about the svn-ports-all
mailing list