Author: janderwald
Date: Sun Sep 15 10:30:14 2013
New Revision: 60126
URL:
http://svn.reactos.org/svn/reactos?rev=60126&view=rev
Log:
[AUDIO]
- Unmap audio buffers after completion
Modified:
trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp [iso-8859-1] Sun Sep 15
10:30:14 2013
@@ -47,14 +47,10 @@
ULONG m_MaxFrameSize;
ULONG m_Alignment;
ULONG m_TagSupportEnabled;
- ULONG m_NumDataAvailable;
+ volatile ULONG m_NumDataAvailable;
volatile ULONG m_CurrentOffset;
-
- PIRP m_Irp;
-
-
- LONG m_Ref;
-
+ volatile PIRP m_Irp;
+ volatile LONG m_Ref;
};
typedef struct
@@ -367,6 +363,8 @@
PKSSTREAM_DATA StreamData;
ULONG Size;
PIO_STACK_LOCATION IoStack;
+ ULONG Index;
+ PMDL Mdl;
// sanity check
ASSERT(m_Irp);
@@ -447,6 +445,13 @@
// done
return;
+ }
+
+ Mdl = m_Irp->MdlAddress;
+ for(Index = 0; Index < StreamData->StreamHeaderCount; Index++)
+ {
+ MmUnmapLockedPages(StreamData->Data[Index], Mdl);
+ Mdl = Mdl->Next;
}
// free stream data array