- Unmap audio buffers after completion

svn path=/trunk/; revision=60126
This commit is contained in:
Johannes Anderwald 2013-09-15 10:30:14 +00:00
parent cbe1c706cd
commit c2b4a8175a

View file

@ -47,14 +47,10 @@ protected:
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 @@ CIrpQueue::UpdateMapping(
PKSSTREAM_DATA StreamData;
ULONG Size;
PIO_STACK_LOCATION IoStack;
ULONG Index;
PMDL Mdl;
// sanity check
ASSERT(m_Irp);
@ -449,6 +447,13 @@ CIrpQueue::UpdateMapping(
return;
}
Mdl = m_Irp->MdlAddress;
for(Index = 0; Index < StreamData->StreamHeaderCount; Index++)
{
MmUnmapLockedPages(StreamData->Data[Index], Mdl);
Mdl = Mdl->Next;
}
// free stream data array
FreeItem(StreamData->Data, TAG_PORTCLASS);