diff options
author | Guido Falsi <madpilot@FreeBSD.org> | 2021-03-14 21:44:13 +0000 |
---|---|---|
committer | Guido Falsi <madpilot@FreeBSD.org> | 2021-03-14 21:44:13 +0000 |
commit | 14c1b5a7405477c396a3829541b4c833d0327662 (patch) | |
tree | d36edd07f4aa7e8ac8e04f47f068b60eff523fce /emulators | |
parent | c0212dd85a9a0376b75e49aacffc365af737a537 (diff) | |
download | ports-14c1b5a7405477c396a3829541b4c833d0327662.tar.gz ports-14c1b5a7405477c396a3829541b4c833d0327662.zip |
Add patch to fix OSS audio to virtualbox-ose-legacy
PR: 237472
Submitted by: Martin Birgmeier <d8zNeCFG@aon.at>
Notes
Notes:
svn path=/head/; revision=568418
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/virtualbox-ose-legacy/Makefile | 2 | ||||
-rw-r--r-- | emulators/virtualbox-ose-legacy/files/patch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp | 32 |
2 files changed, 33 insertions, 1 deletions
diff --git a/emulators/virtualbox-ose-legacy/Makefile b/emulators/virtualbox-ose-legacy/Makefile index 7cb730424fbe..e9e4606497ff 100644 --- a/emulators/virtualbox-ose-legacy/Makefile +++ b/emulators/virtualbox-ose-legacy/Makefile @@ -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 diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp new file mode 100644 index 000000000000..732fb51d35e3 --- /dev/null +++ b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Devices_Audio_DrvHostOSSAudio.cpp @@ -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); |