summaryrefslogtreecommitdiffstats
path: root/src/VBox/Devices/Audio/DevIchAc97.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Devices/Audio/DevIchAc97.cpp')
-rw-r--r--src/VBox/Devices/Audio/DevIchAc97.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/VBox/Devices/Audio/DevIchAc97.cpp b/src/VBox/Devices/Audio/DevIchAc97.cpp
index 97743372..969e12db 100644
--- a/src/VBox/Devices/Audio/DevIchAc97.cpp
+++ b/src/VBox/Devices/Audio/DevIchAc97.cpp
@@ -1730,8 +1730,9 @@ static void ichac97R3StreamReset(PAC97STATE pThis, PAC97STREAM pStream, PAC97STR
LogFunc(("[SD%RU8]\n", pStream->u8SD));
- if (pStreamCC->State.pCircBuf)
- RTCircBufReset(pStreamCC->State.pCircBuf);
+ /* Note: Do *not* reset the stream's circular buffer here, as the audio mixer still relies on
+ * previously announced DMA data (via AudioMixerSinkDrainAndStop()) and processes it asynchronously.
+ * Resetting the buffer here will cause a race condition. See @bugref{10354}. */
pStream->Regs.bdbar = 0;
pStream->Regs.civ = 0;
@@ -2198,7 +2199,11 @@ static int ichac97R3StreamSetUp(PPDMDEVINS pDevIns, PAC97STATE pThis, PAC97STATE
*/
if ( pStreamCC->State.pCircBuf
&& RTCircBufSize(pStreamCC->State.pCircBuf) == cbCircBuf)
- RTCircBufReset(pStreamCC->State.pCircBuf);
+ {
+ /* Note: Do *not* reset the stream's circular buffer here, as the audio mixer still relies on
+ * previously announced DMA data (via AudioMixerSinkDrainAndStop()) and processes it asynchronously.
+ * Resetting the buffer here will cause a race condition. See @bugref{10354}. */
+ }
else
{
if (pStreamCC->State.pCircBuf)