summaryrefslogtreecommitdiff
path: root/audio/sysvad/EndpointsCommon/minwavertstream.cpp
diff options
context:
space:
mode:
authorDaniel Rugerio <[email protected]>2021-08-13 15:05:12 -0700
committerGitHub <[email protected]>2021-08-13 15:05:12 -0700
commit7895dd22785ddba5e973662ed942be3b3452b89d (patch)
tree5c4572d5bfd076d3776a88c5757e37f3ed50c0e7 /audio/sysvad/EndpointsCommon/minwavertstream.cpp
parentdf47b2d284558fa9aacd19257153037e4ebba60e (diff)
audio: Updates for Windows 10 22000 (#655)
* Updates for Windows 10 22000. * Change how WIL is consumed.
Diffstat (limited to 'audio/sysvad/EndpointsCommon/minwavertstream.cpp')
-rw-r--r--audio/sysvad/EndpointsCommon/minwavertstream.cpp23
1 files changed, 10 insertions, 13 deletions
diff --git a/audio/sysvad/EndpointsCommon/minwavertstream.cpp b/audio/sysvad/EndpointsCommon/minwavertstream.cpp
index 499d5b38..08467e05 100644
--- a/audio/sysvad/EndpointsCommon/minwavertstream.cpp
+++ b/audio/sysvad/EndpointsCommon/minwavertstream.cpp
@@ -118,6 +118,8 @@ Return Value:
NTSTATUS CMiniportWaveRTStream::ReadRegistrySettings()
{
+ PAGED_CODE();
+
NTSTATUS ntStatus;
UNICODE_STRING parametersPath;
@@ -140,14 +142,12 @@ NTSTATUS CMiniportWaveRTStream::ReadRegistrySettings()
parametersPath.MaximumLength =
g_RegistryPath.Length + sizeof(L"\\Parameters") + sizeof(WCHAR);
- parametersPath.Buffer = (PWCH)ExAllocatePoolWithTag(PagedPool, parametersPath.MaximumLength, MINWAVERT_POOLTAG);
+ parametersPath.Buffer = (PWCH)ExAllocatePool2(POOL_FLAG_PAGED, parametersPath.MaximumLength, MINWAVERT_POOLTAG);
if (parametersPath.Buffer == NULL)
{
return STATUS_INSUFFICIENT_RESOURCES;
}
- RtlZeroMemory(parametersPath.Buffer, parametersPath.MaximumLength);
-
RtlAppendUnicodeToString(&parametersPath, g_RegistryPath.Buffer);
RtlAppendUnicodeToString(&parametersPath, L"\\Parameters");
@@ -294,39 +294,36 @@ Return Value:
m_bCapture = Capture_;
m_ulDmaMovementRate = pWfEx->nAvgBytesPerSec;
- m_pDpc = (PRKDPC)ExAllocatePoolWithTag(NonPagedPoolNx, sizeof(KDPC), MINWAVERTSTREAM_POOLTAG);
+ m_pDpc = (PRKDPC)ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(KDPC), MINWAVERTSTREAM_POOLTAG);
if (!m_pDpc)
{
return STATUS_INSUFFICIENT_RESOURCES;
}
- m_pWfExt = (PWAVEFORMATEXTENSIBLE)ExAllocatePoolWithTag(NonPagedPoolNx, sizeof(WAVEFORMATEX) + pWfEx->cbSize, MINWAVERTSTREAM_POOLTAG);
+ m_pWfExt = (PWAVEFORMATEXTENSIBLE)ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(WAVEFORMATEX) + pWfEx->cbSize, MINWAVERTSTREAM_POOLTAG);
if (m_pWfExt == NULL)
{
return STATUS_INSUFFICIENT_RESOURCES;
}
RtlCopyMemory(m_pWfExt, pWfEx, sizeof(WAVEFORMATEX) + pWfEx->cbSize);
- m_pbMuted = (PBOOL)ExAllocatePoolWithTag(NonPagedPoolNx, m_pWfExt->Format.nChannels * sizeof(BOOL), MINWAVERTSTREAM_POOLTAG);
+ m_pbMuted = (PBOOL)ExAllocatePool2(POOL_FLAG_NON_PAGED, m_pWfExt->Format.nChannels * sizeof(BOOL), MINWAVERTSTREAM_POOLTAG);
if (m_pbMuted == NULL)
{
return STATUS_INSUFFICIENT_RESOURCES;
}
- RtlZeroMemory(m_pbMuted, m_pWfExt->Format.nChannels * sizeof(BOOL));
- m_plVolumeLevel = (PLONG)ExAllocatePoolWithTag(NonPagedPoolNx, m_pWfExt->Format.nChannels * sizeof(LONG), MINWAVERTSTREAM_POOLTAG);
+ m_plVolumeLevel = (PLONG)ExAllocatePool2(POOL_FLAG_NON_PAGED, m_pWfExt->Format.nChannels * sizeof(LONG), MINWAVERTSTREAM_POOLTAG);
if (m_plVolumeLevel == NULL)
{
return STATUS_INSUFFICIENT_RESOURCES;
}
- RtlZeroMemory(m_plVolumeLevel, m_pWfExt->Format.nChannels * sizeof(LONG));
- m_plPeakMeter = (PLONG)ExAllocatePoolWithTag(NonPagedPoolNx, m_pWfExt->Format.nChannels * sizeof(LONG), MINWAVERTSTREAM_POOLTAG);
+ m_plPeakMeter = (PLONG)ExAllocatePool2(POOL_FLAG_NON_PAGED, m_pWfExt->Format.nChannels * sizeof(LONG), MINWAVERTSTREAM_POOLTAG);
if (m_plPeakMeter == NULL)
{
return STATUS_INSUFFICIENT_RESOURCES;
}
- RtlZeroMemory(m_plPeakMeter, m_pWfExt->Format.nChannels * sizeof(LONG));
//
// Allocate stream audio module resources.
@@ -639,8 +636,8 @@ NTSTATUS CMiniportWaveRTStream::RegisterNotificationEvent
PAGED_CODE();
- NotificationListEntry *nleNew = (NotificationListEntry*)ExAllocatePoolWithTag(
- NonPagedPoolNx,
+ NotificationListEntry *nleNew = (NotificationListEntry*)ExAllocatePool2(
+ POOL_FLAG_NON_PAGED,
sizeof(NotificationListEntry),
MINWAVERTSTREAM_POOLTAG);
if (NULL == nleNew)