- 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_MaxFrameSize;
ULONG m_Alignment; ULONG m_Alignment;
ULONG m_TagSupportEnabled; ULONG m_TagSupportEnabled;
ULONG m_NumDataAvailable; volatile ULONG m_NumDataAvailable;
volatile ULONG m_CurrentOffset; volatile ULONG m_CurrentOffset;
volatile PIRP m_Irp;
PIRP m_Irp; volatile LONG m_Ref;
LONG m_Ref;
}; };
typedef struct typedef struct
@ -367,6 +363,8 @@ CIrpQueue::UpdateMapping(
PKSSTREAM_DATA StreamData; PKSSTREAM_DATA StreamData;
ULONG Size; ULONG Size;
PIO_STACK_LOCATION IoStack; PIO_STACK_LOCATION IoStack;
ULONG Index;
PMDL Mdl;
// sanity check // sanity check
ASSERT(m_Irp); ASSERT(m_Irp);
@ -449,6 +447,13 @@ CIrpQueue::UpdateMapping(
return; return;
} }
Mdl = m_Irp->MdlAddress;
for(Index = 0; Index < StreamData->StreamHeaderCount; Index++)
{
MmUnmapLockedPages(StreamData->Data[Index], Mdl);
Mdl = Mdl->Next;
}
// free stream data array // free stream data array
FreeItem(StreamData->Data, TAG_PORTCLASS); FreeItem(StreamData->Data, TAG_PORTCLASS);