[PORTCLS]
authorJohannes Anderwald <johannes.anderwald@reactos.org>
Fri, 12 Feb 2010 10:12:46 +0000 (10:12 +0000)
committerJohannes Anderwald <johannes.anderwald@reactos.org>
Fri, 12 Feb 2010 10:12:46 +0000 (10:12 +0000)
- Reset play position when an audio stream is stopped
-- Fixes playback in looped mode (DirectSound) when a buffer is played&stopped more than once

svn path=/trunk/; revision=45585

reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp

index 1162b94..e36e9b9 100644 (file)
@@ -450,10 +450,14 @@ PinWaveCyclicState(
                 // FIXME
                 // complete with successful state
                 Pin->m_IrpQueue->CancelBuffers();
+                Pin->m_Position.PlayOffset = 0;
+                Pin->m_Position.WriteOffset = 0;
             }
             else if (Pin->m_State == KSSTATE_STOP)
             {
                 Pin->m_IrpQueue->CancelBuffers();
+                Pin->m_Position.PlayOffset = 0;
+                Pin->m_Position.WriteOffset = 0;
             }
             // store result
             Irp->IoStatus.Information = sizeof(KSSTATE);