diff options
| author | Daniel Rugerio <[email protected]> | 2021-08-13 15:05:12 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-13 15:05:12 -0700 |
| commit | 7895dd22785ddba5e973662ed942be3b3452b89d (patch) | |
| tree | 5c4572d5bfd076d3776a88c5757e37f3ed50c0e7 /audio/sysvad/savedata.cpp | |
| parent | df47b2d284558fa9aacd19257153037e4ebba60e (diff) | |
audio: Updates for Windows 10 22000 (#655)
* Updates for Windows 10 22000.
* Change how WIL is consumed.
Diffstat (limited to 'audio/sysvad/savedata.cpp')
| -rw-r--r-- | audio/sysvad/savedata.cpp | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/audio/sysvad/savedata.cpp b/audio/sysvad/savedata.cpp index 7e60cf4d..cb5f5cfc 100644 --- a/audio/sysvad/savedata.cpp +++ b/audio/sysvad/savedata.cpp @@ -510,9 +510,9 @@ CSaveData::Initialize { m_FileName.MaximumLength = (USHORT)((cLen * sizeof(WCHAR)) + sizeof(WCHAR));//convert to wchar and add room for NULL m_FileName.Buffer = (PWSTR) - ExAllocatePoolWithTag + ExAllocatePool2 ( - PagedPool, + POOL_FLAG_PAGED, m_FileName.MaximumLength, SAVEDATA_POOLTAG3 ); @@ -532,9 +532,9 @@ CSaveData::Initialize DPF(D_BLAB, ("[New DataFile -- %S", m_FileName.Buffer)); m_pDataBuffer = (PBYTE) - ExAllocatePoolWithTag + ExAllocatePool2 ( - NonPagedPoolNx, + POOL_FLAG_NON_PAGED, m_ulBufferSize, SAVEDATA_POOLTAG4 ); @@ -543,10 +543,6 @@ CSaveData::Initialize DPF(D_TERSE, ("[Could not allocate memory for Saving Data]")); ntStatus = STATUS_INSUFFICIENT_RESOURCES; } - else - { - RtlZeroMemory(m_pDataBuffer, m_ulBufferSize); - } } // Allocate memory for frame usage flags and m_pFilePtr. @@ -554,9 +550,9 @@ CSaveData::Initialize if (NT_SUCCESS(ntStatus)) { m_fFrameUsed = (PBOOL) - ExAllocatePoolWithTag + ExAllocatePool2 ( - NonPagedPoolNx, + POOL_FLAG_NON_PAGED, m_ulFrameCount * sizeof(BOOL) + sizeof(LARGE_INTEGER), SAVEDATA_POOLTAG2 @@ -584,7 +580,6 @@ CSaveData::Initialize // m_pFilePtr = (PLARGE_INTEGER) (((PBYTE) m_fFrameUsed) + m_ulFrameCount * sizeof(BOOL)); - RtlZeroMemory(m_fFrameUsed, m_ulFrameCount * sizeof(BOOL) + sizeof(LARGE_INTEGER)); // Create data file. InitializeObjectAttributes @@ -646,9 +641,9 @@ CSaveData::InitializeWorkItems } m_pWorkItems = (PSAVEWORKER_PARAM) - ExAllocatePoolWithTag + ExAllocatePool2 ( - NonPagedPoolNx, + POOL_FLAG_NON_PAGED, sizeof(SAVEWORKER_PARAM) * MAX_WORKER_ITEM_COUNT, SAVEDATA_POOLTAG ); @@ -775,9 +770,9 @@ CSaveData::SetDataFormat } m_waveFormat = (PWAVEFORMATEX) - ExAllocatePoolWithTag + ExAllocatePool2 ( - NonPagedPoolNx, + POOL_FLAG_NON_PAGED, (pwfx->wFormatTag == WAVE_FORMAT_PCM) ? sizeof( PCMWAVEFORMAT ) : sizeof( WAVEFORMATEX ) + pwfx->cbSize, @@ -830,9 +825,9 @@ CSaveData::SetMaxWriteSize // Alloc memory for buffer. // buffer = (PBYTE) - ExAllocatePoolWithTag + ExAllocatePool2 ( - NonPagedPoolNx, + POOL_FLAG_NON_PAGED, bufferSize, SAVEDATA_POOLTAG4 ); @@ -843,8 +838,6 @@ CSaveData::SetMaxWriteSize goto Done; } - RtlZeroMemory(buffer, bufferSize); - // // Free old one. // |
