summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulia D'Zmura <[email protected]>2023-03-09 10:19:19 -0800
committerGitHub <[email protected]>2023-03-09 10:19:19 -0800
commit7d7f9388ae3077ca010a719dbcd3da0534272046 (patch)
treea20eb16305be03885ee121528e4ae8248addd241
parentbe97ab4846375ead2c997517ade7127fd123eeea (diff)
Updates to Sysvad and SimpleAudioSample. (#917)
* Updates to Sysvad and simpleAudioSample. * Changing dash to ASCII.
-rw-r--r--audio/simpleaudiosample/Source/Main/adapter.cpp2
-rw-r--r--audio/simpleaudiosample/Source/Main/common.cpp5
-rw-r--r--audio/sysvad/APO/DelayAPO/DelayAPOMFX.cpp4
-rw-r--r--audio/sysvad/APO/DelayAPO/DelayAPOSFX.cpp2
-rw-r--r--audio/sysvad/TabletAudioSample/ComponentizedApoSample.inxbin22572 -> 22624 bytes
-rw-r--r--audio/sysvad/TabletAudioSample/ComponentizedAudioSampleExtension.inxbin13608 -> 13660 bytes
-rw-r--r--audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj12
7 files changed, 15 insertions, 10 deletions
diff --git a/audio/simpleaudiosample/Source/Main/adapter.cpp b/audio/simpleaudiosample/Source/Main/adapter.cpp
index bbe23f26..a66ee5a2 100644
--- a/audio/simpleaudiosample/Source/Main/adapter.cpp
+++ b/audio/simpleaudiosample/Source/Main/adapter.cpp
@@ -59,6 +59,8 @@ UNICODE_STRING g_RegistryPath; // This is used to store the registry settin
#pragma code_seg("PAGE")
void ReleaseRegistryStringBuffer()
{
+ PAGED_CODE();
+
if (g_RegistryPath.Buffer != NULL)
{
ExFreePool(g_RegistryPath.Buffer);
diff --git a/audio/simpleaudiosample/Source/Main/common.cpp b/audio/simpleaudiosample/Source/Main/common.cpp
index 8843d3a4..457bdb17 100644
--- a/audio/simpleaudiosample/Source/Main/common.cpp
+++ b/audio/simpleaudiosample/Source/Main/common.cpp
@@ -2547,6 +2547,7 @@ Exit:
return ntStatus;
}
+#pragma code_seg("PAGE")
NTSTATUS
CopyRegistryKey(HANDLE _hSourceKey, HANDLE _hDestinationKey, BOOL _bOverwrite = FALSE)
/*++
@@ -2686,7 +2687,7 @@ Exit:
return ntStatus;
}
-
+#pragma code_seg("PAGE")
NTSTATUS CAdapterCommon::MigrateDeviceInterfaceTemplateParameters
(
_In_ PUNICODE_STRING SymbolicLinkName,
@@ -2729,6 +2730,8 @@ Return Value:
UNICODE_STRING TemplateSymbolicLinkName;
UNICODE_STRING referenceString;
+ PAGED_CODE();
+
RtlInitUnicodeString(&TemplateSymbolicLinkName, NULL);
RtlInitUnicodeString(&referenceString, TemplateReferenceString);
diff --git a/audio/sysvad/APO/DelayAPO/DelayAPOMFX.cpp b/audio/sysvad/APO/DelayAPO/DelayAPOMFX.cpp
index e7492131..af67571b 100644
--- a/audio/sysvad/APO/DelayAPO/DelayAPOMFX.cpp
+++ b/audio/sysvad/APO/DelayAPO/DelayAPOMFX.cpp
@@ -292,7 +292,7 @@ STDMETHODIMP CDelayAPOMFX::LockForProcess(UINT32 u32NumInputConnections,
//
// A more typical approach would be to allocate the memory using AERT_Allocate, which locks the memory
// But for the purposes of this APO, CoTaskMemAlloc suffices, and the risk of glitches is not important
- m_pf32DelayBuffer.Allocate(GetSamplesPerFrame() * m_nDelayFrames);
+ m_pf32DelayBuffer.Allocate((size_t) GetSamplesPerFrame() * m_nDelayFrames);
WriteSilence(m_pf32DelayBuffer, m_nDelayFrames, GetSamplesPerFrame());
if (nullptr == m_pf32DelayBuffer)
{
@@ -1166,4 +1166,4 @@ HRESULT CDelayAPOMFX::CheckCustomFormats(IAudioMediaType *pRequestedFormat)
}
return hResult;
-} \ No newline at end of file
+}
diff --git a/audio/sysvad/APO/DelayAPO/DelayAPOSFX.cpp b/audio/sysvad/APO/DelayAPO/DelayAPOSFX.cpp
index c37abb7c..67ae2788 100644
--- a/audio/sysvad/APO/DelayAPO/DelayAPOSFX.cpp
+++ b/audio/sysvad/APO/DelayAPO/DelayAPOSFX.cpp
@@ -241,7 +241,7 @@ STDMETHODIMP CDelayAPOSFX::LockForProcess(UINT32 u32NumInputConnections,
//
// A more typical approach would be to allocate the memory using AERT_Allocate, which locks the memory
// But for the purposes of this APO, CoTaskMemAlloc suffices, and the risk of glitches is not important
- m_pf32DelayBuffer.Allocate(GetSamplesPerFrame() * m_nDelayFrames);
+ m_pf32DelayBuffer.Allocate((size_t) GetSamplesPerFrame() * m_nDelayFrames);
WriteSilence(m_pf32DelayBuffer, m_nDelayFrames, GetSamplesPerFrame());
if (nullptr == m_pf32DelayBuffer)
diff --git a/audio/sysvad/TabletAudioSample/ComponentizedApoSample.inx b/audio/sysvad/TabletAudioSample/ComponentizedApoSample.inx
index 34b8401a..b18b528c 100644
--- a/audio/sysvad/TabletAudioSample/ComponentizedApoSample.inx
+++ b/audio/sysvad/TabletAudioSample/ComponentizedApoSample.inx
Binary files differ
diff --git a/audio/sysvad/TabletAudioSample/ComponentizedAudioSampleExtension.inx b/audio/sysvad/TabletAudioSample/ComponentizedAudioSampleExtension.inx
index 4afba224..aa6928d0 100644
--- a/audio/sysvad/TabletAudioSample/ComponentizedAudioSampleExtension.inx
+++ b/audio/sysvad/TabletAudioSample/ComponentizedAudioSampleExtension.inx
Binary files differ
diff --git a/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj b/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj
index fe70dacf..6e4e4c44 100644
--- a/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj
+++ b/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj
@@ -40,7 +40,7 @@
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>False</UseDebugLibraries>
- <DriverTargetPlatform>Windows Driver</DriverTargetPlatform>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
<DriverType>KMDF</DriverType>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
@@ -48,7 +48,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>False</UseDebugLibraries>
- <DriverTargetPlatform>Windows Driver</DriverTargetPlatform>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
<DriverType>KMDF</DriverType>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
@@ -56,7 +56,7 @@
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>True</UseDebugLibraries>
- <DriverTargetPlatform>Windows Driver</DriverTargetPlatform>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
<DriverType>KMDF</DriverType>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
@@ -64,7 +64,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>True</UseDebugLibraries>
- <DriverTargetPlatform>Windows Driver</DriverTargetPlatform>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
<DriverType>KMDF</DriverType>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
@@ -72,7 +72,7 @@
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>False</UseDebugLibraries>
- <DriverTargetPlatform>Windows Driver</DriverTargetPlatform>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
<DriverType>KMDF</DriverType>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
@@ -80,7 +80,7 @@
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>True</UseDebugLibraries>
- <DriverTargetPlatform>Windows Driver</DriverTargetPlatform>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
<DriverType>KMDF</DriverType>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>