diff options
| author | Luke <[email protected]> | 2017-11-28 00:22:11 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-11-28 00:22:11 -0800 |
| commit | 79bbbca2f6e37d94fbbbd60d12c5c1e7dde650da (patch) | |
| tree | 793ff943b8b641f95d05401156badd42da4a0f12 /audio/sysvad | |
| parent | ed1df9a8b80b154b71b79635e40af75f4f19001c (diff) | |
| parent | 2817004092cee784d4aaf36c045fdb5b0bc09f7e (diff) | |
Merge pull request #1 from Microsoft/master
Updating Local
Diffstat (limited to 'audio/sysvad')
42 files changed, 930 insertions, 5352 deletions
diff --git a/audio/sysvad/EndpointsCommon/micarraywavtable.h b/audio/sysvad/EndpointsCommon/micarraywavtable.h index 3b6c2df0..beda8742 100644 --- a/audio/sysvad/EndpointsCommon/micarraywavtable.h +++ b/audio/sysvad/EndpointsCommon/micarraywavtable.h @@ -21,8 +21,8 @@ Abstract: #define MICARRAY_RAW_CHANNELS 2 // Channels for raw mode #define MICARRAY_PROCESSED_CHANNELS 1 // Channels for default mode #define MICARRAY_DEVICE_MAX_CHANNELS 2 // Max channels overall -#define MICARRAY_MIN_BITS_PER_SAMPLE_PCM 16 // Min Bits Per Sample -#define MICARRAY_MAX_BITS_PER_SAMPLE_PCM 16 // Max Bits Per Sample +#define MICARRAY_16_BITS_PER_SAMPLE_PCM 16 // 16 Bits Per Sample +#define MICARRAY_32_BITS_PER_SAMPLE_PCM 32 // 32 Bits Per Sample #define MICARRAY_RAW_SAMPLE_RATE 48000 // Raw sample rate #define MICARRAY_PROCESSED_MIN_SAMPLE_RATE 8000 // Min Sample Rate #define MICARRAY_PROCESSED_MAX_SAMPLE_RATE 48000 // Max Sample Rate @@ -253,7 +253,7 @@ KSDATAFORMAT_WAVEFORMATEXTENSIBLE MicArrayPinSupportedDeviceFormats[] = } }, // 8 - Note the ENDPOINT_MINIPAIR structures for the mic arrays use this last element as the proposed RAW format - // 48 KHz 16-bit 2 channels + // 48 KHz 32-bit 2 channels { { sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE), @@ -269,12 +269,12 @@ KSDATAFORMAT_WAVEFORMATEXTENSIBLE MicArrayPinSupportedDeviceFormats[] = WAVE_FORMAT_EXTENSIBLE, 2, 48000, - 192000, - 4, - 16, + 384000, + 8, + 32, sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX) }, - 16, + 32, 0, // No channel configuration for unprocessed mic array STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM) } @@ -398,8 +398,8 @@ KSDATARANGE_AUDIO MicArrayPinDataRangesRawStream[] = STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX) }, MICARRAY_RAW_CHANNELS, - MICARRAY_MIN_BITS_PER_SAMPLE_PCM, - MICARRAY_MAX_BITS_PER_SAMPLE_PCM, + MICARRAY_32_BITS_PER_SAMPLE_PCM, + MICARRAY_32_BITS_PER_SAMPLE_PCM, MICARRAY_RAW_SAMPLE_RATE, MICARRAY_RAW_SAMPLE_RATE }, @@ -419,8 +419,8 @@ KSDATARANGE_AUDIO MicArrayPinDataRangesProcessedStream[] = STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX) }, MICARRAY_PROCESSED_CHANNELS, - MICARRAY_MIN_BITS_PER_SAMPLE_PCM, - MICARRAY_MAX_BITS_PER_SAMPLE_PCM, + MICARRAY_16_BITS_PER_SAMPLE_PCM, + MICARRAY_16_BITS_PER_SAMPLE_PCM, MICARRAY_PROCESSED_MIN_SAMPLE_RATE, MICARRAY_PROCESSED_MIN_SAMPLE_RATE }, @@ -435,8 +435,8 @@ KSDATARANGE_AUDIO MicArrayPinDataRangesProcessedStream[] = STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX) }, MICARRAY_PROCESSED_CHANNELS, - MICARRAY_MIN_BITS_PER_SAMPLE_PCM, - MICARRAY_MAX_BITS_PER_SAMPLE_PCM, + MICARRAY_16_BITS_PER_SAMPLE_PCM, + MICARRAY_16_BITS_PER_SAMPLE_PCM, 11025, 11025 }, @@ -451,8 +451,8 @@ KSDATARANGE_AUDIO MicArrayPinDataRangesProcessedStream[] = STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX) }, MICARRAY_PROCESSED_CHANNELS, - MICARRAY_MIN_BITS_PER_SAMPLE_PCM, - MICARRAY_MAX_BITS_PER_SAMPLE_PCM, + MICARRAY_16_BITS_PER_SAMPLE_PCM, + MICARRAY_16_BITS_PER_SAMPLE_PCM, 16000, 16000 }, @@ -467,8 +467,8 @@ KSDATARANGE_AUDIO MicArrayPinDataRangesProcessedStream[] = STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX) }, MICARRAY_PROCESSED_CHANNELS, - MICARRAY_MIN_BITS_PER_SAMPLE_PCM, - MICARRAY_MAX_BITS_PER_SAMPLE_PCM, + MICARRAY_16_BITS_PER_SAMPLE_PCM, + MICARRAY_16_BITS_PER_SAMPLE_PCM, 22050, 22050 }, @@ -483,8 +483,8 @@ KSDATARANGE_AUDIO MicArrayPinDataRangesProcessedStream[] = STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX) }, MICARRAY_PROCESSED_CHANNELS, - MICARRAY_MIN_BITS_PER_SAMPLE_PCM, - MICARRAY_MAX_BITS_PER_SAMPLE_PCM, + MICARRAY_16_BITS_PER_SAMPLE_PCM, + MICARRAY_16_BITS_PER_SAMPLE_PCM, 24000, 24000 }, @@ -499,8 +499,8 @@ KSDATARANGE_AUDIO MicArrayPinDataRangesProcessedStream[] = STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX) }, MICARRAY_PROCESSED_CHANNELS, - MICARRAY_MIN_BITS_PER_SAMPLE_PCM, - MICARRAY_MAX_BITS_PER_SAMPLE_PCM, + MICARRAY_16_BITS_PER_SAMPLE_PCM, + MICARRAY_16_BITS_PER_SAMPLE_PCM, 32000, 32000 }, @@ -515,8 +515,8 @@ KSDATARANGE_AUDIO MicArrayPinDataRangesProcessedStream[] = STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX) }, MICARRAY_PROCESSED_CHANNELS, - MICARRAY_MIN_BITS_PER_SAMPLE_PCM, - MICARRAY_MAX_BITS_PER_SAMPLE_PCM, + MICARRAY_16_BITS_PER_SAMPLE_PCM, + MICARRAY_16_BITS_PER_SAMPLE_PCM, 44100, 44100 }, @@ -531,8 +531,8 @@ KSDATARANGE_AUDIO MicArrayPinDataRangesProcessedStream[] = STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX) }, MICARRAY_PROCESSED_CHANNELS, - MICARRAY_MIN_BITS_PER_SAMPLE_PCM, - MICARRAY_MAX_BITS_PER_SAMPLE_PCM, + MICARRAY_16_BITS_PER_SAMPLE_PCM, + MICARRAY_16_BITS_PER_SAMPLE_PCM, MICARRAY_PROCESSED_MAX_SAMPLE_RATE, MICARRAY_PROCESSED_MAX_SAMPLE_RATE }, diff --git a/audio/sysvad/KeywordDetectorAdapter/KeywordDetectorContosoAdapter.vcxproj b/audio/sysvad/KeywordDetectorAdapter/KeywordDetectorContosoAdapter.vcxproj index fc459cfa..54913231 100644 --- a/audio/sysvad/KeywordDetectorAdapter/KeywordDetectorContosoAdapter.vcxproj +++ b/audio/sysvad/KeywordDetectorAdapter/KeywordDetectorContosoAdapter.vcxproj @@ -31,7 +31,7 @@ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>DynamicLibrary</ConfigurationType> @@ -39,7 +39,7 @@ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>DynamicLibrary</ConfigurationType> @@ -47,7 +47,7 @@ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>DynamicLibrary</ConfigurationType> @@ -55,7 +55,7 @@ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> <ConfigurationType>DynamicLibrary</ConfigurationType> diff --git a/audio/sysvad/Package/package.VcxProj b/audio/sysvad/Package/package.VcxProj index 0ea6ab39..cd7c9ddc 100644 --- a/audio/sysvad/Package/package.VcxProj +++ b/audio/sysvad/Package/package.VcxProj @@ -31,9 +31,6 @@ <ProjectReference Include="..\SwapAPO\DelayAPO\DelayAPO.vcxproj"> <Project>{8851AB85-70B3-4798-A149-BA366DF9EC25}</Project> </ProjectReference> - <ProjectReference Include="..\SwapAPO\PropPageExtensions\PropPageExt.vcxproj"> - <Project>{D253C552-154D-49E1-820A-B2CD9D9FF13E}</Project> - </ProjectReference> <ProjectReference Include="..\TabletAudioSample\TabletAudioSample.vcxproj"> <Project>{E4DF0EEE-D35B-47F2-A9B1-41EA97C465FF}</Project> </ProjectReference> diff --git a/audio/sysvad/PhoneAudioSample/PhoneAudioSample.vcxproj b/audio/sysvad/PhoneAudioSample/PhoneAudioSample.vcxproj index f140a088..cf608ab0 100644 --- a/audio/sysvad/PhoneAudioSample/PhoneAudioSample.vcxproj +++ b/audio/sysvad/PhoneAudioSample/PhoneAudioSample.vcxproj @@ -83,19 +83,19 @@ <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\portcls.lib;$(DDK_LIB_PATH)\stdunk.lib;$(DDK_LIB_PATH)\libcntpr.lib</AdditionalDependencies> </Link> <ResourceCompile> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions> </ResourceCompile> <ClCompile> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions> </ClCompile> <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions> </Midl> @@ -105,19 +105,19 @@ <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\portcls.lib;$(DDK_LIB_PATH)\stdunk.lib;$(DDK_LIB_PATH)\libcntpr.lib</AdditionalDependencies> </Link> <ResourceCompile> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions> </ResourceCompile> <ClCompile> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions> </ClCompile> <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions> </Midl> @@ -127,19 +127,19 @@ <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\portcls.lib;$(DDK_LIB_PATH)\stdunk.lib;$(DDK_LIB_PATH)\libcntpr.lib</AdditionalDependencies> </Link> <ResourceCompile> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions> </ResourceCompile> <ClCompile> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions> </ClCompile> <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions> </Midl> @@ -149,19 +149,19 @@ <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\portcls.lib;$(DDK_LIB_PATH)\stdunk.lib;$(DDK_LIB_PATH)\libcntpr.lib</AdditionalDependencies> </Link> <ResourceCompile> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions> </ResourceCompile> <ClCompile> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories> <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions> </ClCompile> <Midl> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions> </Midl> @@ -301,4 +301,4 @@ <ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> -</Project>
\ No newline at end of file +</Project> diff --git a/audio/sysvad/README.md b/audio/sysvad/README.md index a7bce35e..8a5c7709 100644 --- a/audio/sysvad/README.md +++ b/audio/sysvad/README.md @@ -1,3 +1,12 @@ +<!--- + name: SysVAD Virtual Audio Device Driver Sample + platform: WDM + language: cpp + category: Audio + description: The Microsoft SysVAD Virtual Audio Device Driver (SYSVAD) shows how to develop a WDM audio driver that exposes support for multiple audio devices. + samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620183 +---> + SysVAD Virtual Audio Device Driver Sample ======================================== @@ -28,7 +37,7 @@ Perform the following steps to build this sample driver. In Microsoft Visual Studio, Click **File** \> **Open** \> **Project/Solution...** and navigate to the folder that contains the sample files (for example, *C:\Windows-driver-samples\audio\sysvad*). Double-click the *sysvad* solution file. -In Visual Studio locate the Solution Explorer. (If this is not already open, choose **Solution Explorer** from the **View** menu.) In Solution Explorer, you can see one solution that has four projects. Note that the project titled SwapAPO is actually a folder that contains two projects - APO and PropPageExtensions. +In Visual Studio locate the Solution Explorer. (If this is not already open, choose **Solution Explorer** from the **View** menu.) In Solution Explorer, you can see one solution that has four projects. **2. Set the sample's configuration and platform** @@ -48,14 +57,12 @@ The package should contain these files: File | Description -----|------------ -TabletAudioSample.sys OR PhoneAudioSample| The driver file. +TabletAudioSample.sys OR PhoneAudioSample.sys| The driver file. SwapAPO.dll | A sample APO. DelayAPO.dll | A sample APO. -PropPageExt.dll | A sample driver extension for a property page. sysvad.cat | A signed catalog file, which serves as the signature for the entire package. TabletAudioSample.inf | An information (INF) file that contains information needed to install the driver. -PhoneAudioSample.inf | An information (INF) file that contains information needed to install the driver. -WdfCoinstaller01011.dll | The coinstaller for version 1.xx of KMDF. +PhoneAudioSample.inf | An information (INF) file that contains information needed to install the driver. Run the sample -------------- diff --git a/audio/sysvad/SwapAPO/APO/SwapAPO.vcxproj b/audio/sysvad/SwapAPO/APO/SwapAPO.vcxproj index 87400997..9737729a 100644 --- a/audio/sysvad/SwapAPO/APO/SwapAPO.vcxproj +++ b/audio/sysvad/SwapAPO/APO/SwapAPO.vcxproj @@ -31,7 +31,7 @@ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <EmbedManifest>false</EmbedManifest> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> @@ -40,7 +40,7 @@ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <EmbedManifest>false</EmbedManifest> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> @@ -49,7 +49,7 @@ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <EmbedManifest>false</EmbedManifest> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> @@ -58,7 +58,7 @@ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <EmbedManifest>false</EmbedManifest> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> @@ -134,18 +134,18 @@ <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> <ExceptionHandling> </ExceptionHandling> <RuntimeLibrary /> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> </ResourceCompile> <Link> <AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;AudioBaseProcessingObjectV140.lib;audiomediatypecrt.lib;AudioEng.lib</AdditionalDependencies> @@ -158,18 +158,18 @@ <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> <ExceptionHandling> </ExceptionHandling> <RuntimeLibrary /> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> </ResourceCompile> <Link> <AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;AudioBaseProcessingObjectV140.lib;audiomediatypecrt.lib;AudioEng.lib</AdditionalDependencies> @@ -182,18 +182,18 @@ <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> <ExceptionHandling> </ExceptionHandling> <RuntimeLibrary /> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> </ResourceCompile> <Link> <AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;AudioBaseProcessingObjectV140.lib;audiomediatypecrt.lib;AudioEng.lib</AdditionalDependencies> @@ -206,18 +206,18 @@ <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> <ExceptionHandling> </ExceptionHandling> <RuntimeLibrary /> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> </ResourceCompile> <Link> <AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;AudioBaseProcessingObjectV140.lib;audiomediatypecrt.lib;AudioEng.lib</AdditionalDependencies> @@ -247,4 +247,4 @@ <ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> -</Project>
\ No newline at end of file +</Project> diff --git a/audio/sysvad/SwapAPO/APO/SwapAPO.vcxproj.Filters b/audio/sysvad/SwapAPO/APO/SwapAPO.vcxproj.Filters index 7cb395b8..631acbca 100644 --- a/audio/sysvad/SwapAPO/APO/SwapAPO.vcxproj.Filters +++ b/audio/sysvad/SwapAPO/APO/SwapAPO.vcxproj.Filters @@ -33,13 +33,28 @@ <Midl Include="SwapAPOInterface.idl"> <Filter>Source Files</Filter> </Midl> - <None Include="SwapAPODll.def"> - <Filter>Source Files</Filter> - </None> </ItemGroup> <ItemGroup> <ResourceCompile Include="SwapAPODll.rc"> <Filter>Resource Files</Filter> </ResourceCompile> </ItemGroup> + <ItemGroup> + <ClInclude Include="Resource.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="SwapAPO.h" /> + <ClInclude Include="Resource.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="SwapAPO.h" /> + </ItemGroup> + <ItemGroup> + <None Include="*.ico;*.cur;*.bmp;*.dlg;*.rct;*.gif;*.jpg;*.jpeg;*.wav;*.jpe;*.tiff;*.tif;*.png;*.rc2"> + <Filter>Resource Files</Filter> + </None> + <None Include="*.def;*.bat;*.hpj;*.asmx"> + <Filter>Source Files</Filter> + </None> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/audio/sysvad/SwapAPO/DelayAPO/DelayAPO.vcxproj b/audio/sysvad/SwapAPO/DelayAPO/DelayAPO.vcxproj index 229ce262..ee3db3f6 100644 --- a/audio/sysvad/SwapAPO/DelayAPO/DelayAPO.vcxproj +++ b/audio/sysvad/SwapAPO/DelayAPO/DelayAPO.vcxproj @@ -31,7 +31,7 @@ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <EmbedManifest>false</EmbedManifest> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> @@ -40,7 +40,7 @@ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <EmbedManifest>false</EmbedManifest> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> @@ -49,7 +49,7 @@ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <EmbedManifest>false</EmbedManifest> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> @@ -58,7 +58,7 @@ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <EmbedManifest>false</EmbedManifest> <DriverType /> <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> @@ -134,18 +134,18 @@ <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> <ExceptionHandling> </ExceptionHandling> <RuntimeLibrary /> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> </ResourceCompile> <Link> <AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;AudioBaseProcessingObjectV140.lib;audiomediatypecrt.lib;AudioEng.lib</AdditionalDependencies> @@ -158,18 +158,18 @@ <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> <ExceptionHandling> </ExceptionHandling> <RuntimeLibrary /> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> </ResourceCompile> <Link> <AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;AudioBaseProcessingObjectV140.lib;audiomediatypecrt.lib;AudioEng.lib</AdditionalDependencies> @@ -182,18 +182,18 @@ <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> <ExceptionHandling> </ExceptionHandling> <RuntimeLibrary /> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> </ResourceCompile> <Link> <AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;AudioBaseProcessingObjectV140.lib;audiomediatypecrt.lib;AudioEng.lib</AdditionalDependencies> @@ -206,18 +206,18 @@ <TreatWarningAsError>true</TreatWarningAsError> <WarningLevel>Level4</WarningLevel> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> <ExceptionHandling> </ExceptionHandling> <RuntimeLibrary /> </ClCompile> <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories> </ResourceCompile> <Link> <AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;AudioBaseProcessingObjectV140.lib;audiomediatypecrt.lib;AudioEng.lib</AdditionalDependencies> diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/PropPageExt.vcxproj.Filters b/audio/sysvad/SwapAPO/DelayAPO/DelayAPO.vcxproj.Filters index 98832fba..a1e7102a 100644 --- a/audio/sysvad/SwapAPO/PropPageExtensions/PropPageExt.vcxproj.Filters +++ b/audio/sysvad/SwapAPO/DelayAPO/DelayAPO.vcxproj.Filters @@ -3,49 +3,58 @@ <ItemGroup> <Filter Include="Source Files"> <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions> - <UniqueIdentifier>{413921B3-AEE4-4E51-B616-E356BEC9E42E}</UniqueIdentifier> + <UniqueIdentifier>{5f4ff11d-7a0b-4f75-9d79-744ae028cc53}</UniqueIdentifier> </Filter> <Filter Include="Header Files"> <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> - <UniqueIdentifier>{0B044B82-EDD8-49A9-ACEE-2E7C98CCA3DC}</UniqueIdentifier> + <UniqueIdentifier>{bd103b81-05b2-440e-84e7-0723d7fe4109}</UniqueIdentifier> </Filter> <Filter Include="Resource Files"> <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions> - <UniqueIdentifier>{1E3956FB-B7AD-48BF-AD18-28527349BEED}</UniqueIdentifier> + <UniqueIdentifier>{a57b6b78-38ae-4348-ade3-0200e81a3dd7}</UniqueIdentifier> </Filter> </ItemGroup> <ItemGroup> - <ClCompile Include="AdvEndpointPropPage.cpp"> + <ClCompile Include="Delay.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="CplExt.cpp"> + <ClCompile Include="DelayAPODll.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="Parts.cpp"> + <ClCompile Include="DelayAPOMFX.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="stdafxsrc.cpp"> + <ClCompile Include="DelayAPOSFX.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="SwapPropPage.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="TopologyExaminers.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="UIWidgets.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <Midl Include="CplExt.idl"> + <Midl Include="DelayAPODll.idl"> <Filter>Source Files</Filter> </Midl> - <None Include="PropPageExt.def"> + <Midl Include="DelayAPOInterface.idl"> <Filter>Source Files</Filter> - </None> + </Midl> </ItemGroup> <ItemGroup> - <ResourceCompile Include="CplExt.rc"> + <ResourceCompile Include="DelayAPODll.rc"> <Filter>Resource Files</Filter> </ResourceCompile> </ItemGroup> + <ItemGroup> + <ClInclude Include="Resource.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="DelayAPO.h" /> + <ClInclude Include="Resource.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="DelayAPO.h" /> + </ItemGroup> + <ItemGroup> + <None Include="*.ico;*.cur;*.bmp;*.dlg;*.rct;*.gif;*.jpg;*.jpeg;*.wav;*.jpe;*.tiff;*.tif;*.png;*.rc2"> + <Filter>Resource Files</Filter> + </None> + <None Include="*.def;*.bat;*.hpj;*.asmx"> + <Filter>Source Files</Filter> + </None> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/AdvEndpointPropPage.cpp b/audio/sysvad/SwapAPO/PropPageExtensions/AdvEndpointPropPage.cpp deleted file mode 100644 index 73c243b4..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/AdvEndpointPropPage.cpp +++ /dev/null @@ -1,1087 +0,0 @@ -//**@@@*@@@**************************************************** -// -// Microsoft Windows -// Copyright (C) Microsoft Corporation. All rights reserved. -// -//**@@@*@@@**************************************************** - -// -// FileName: AdvEndpointPropPage.cpp -// -// Abstract: Implementation of CAdvEndpointPropPage -// -// ---------------------------------------------------------------------------- - - -#include "stdafx.h" -#include <mmdeviceapi.h> -#include <DeviceTopology.h> -#include "UIWidgets.h" -#include "Parts.h" -#include "TopologyExaminers.h" -#include "AdvEndpointPropPage.h" -#include <functiondiscoverykeys.h> - -_Analysis_mode_(_Analysis_code_type_user_driver_) - -#define MAX_SEARCH_DEPTH 5 // when searching for a host pin or interface - -static IID s_rgAdvCtrlInterfaces[] = -{ - __uuidof(IAudioLoudness), - __uuidof(IAudioAutoGainControl), - __uuidof(IDeviceSpecificProperty) -}; - - -// ---------------------------------------------------------------------------- -// Function: -// CAdvEndpointPropPage::CAdvEndpointPropPage -// -// Description: -// CAdvEndpointPropPage constructor -// ---------------------------------------------------------------------------- -CAdvEndpointPropPage::CAdvEndpointPropPage() -: m_pAudioExtParams(NULL) -{ -} - - -// ---------------------------------------------------------------------------- -// Function: -// CAdvEndpointPropPage::~CAdvEndpointPropPage -// -// Description: -// CAdvEndpointPropPage destructor -// ---------------------------------------------------------------------------- -CAdvEndpointPropPage::~CAdvEndpointPropPage() -{ - CUIWidget* pWidget; - - while (m_lstWidgets.RemoveHead(&pWidget)) - { - SAFE_DELETE(pWidget); - } - - SAFE_RELEASE(m_pAudioExtParams->pEndpoint); - SAFE_RELEASE(m_pAudioExtParams->pPnpInterface); - SAFE_RELEASE(m_pAudioExtParams->pPnpDevnode); - - SAFE_DELETE(m_pAudioExtParams); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CAdvEndpointPropPage::MakeNewWidget -// -// Description: -// Adds a widget to the list -// -// Parameters: -// pPart - [in] Part interface -// iid - [in] Advanced control IID which controls the kind of widget -// that gets created -// nCtrlId - [in] ID of the control -// -// Return: -// S_OK if successful -// ---------------------------------------------------------------------------- -HRESULT CAdvEndpointPropPage::MakeNewWidget -( - IPart* pPart, - REFIID iid, - UINT nCtrlId -) -{ - UNREFERENCED_PARAMETER(nCtrlId); - - HRESULT hr = S_OK; - LISTPOS posChk; - CUIWidget* pNewWidget = NULL; - - if ((iid == __uuidof(IAudioLoudness)) || - (iid == __uuidof(IAudioAutoGainControl))) - { - pNewWidget = new CBooleanWidget(pPart, iid); - IF_TRUE_ACTION_JUMP((pNewWidget == NULL), hr = E_OUTOFMEMORY, Exit); - } - else if (iid == __uuidof(IDeviceSpecificProperty)) - { - CComPtr<IDeviceSpecificProperty> spDevSpec; - VARTYPE vt; - - hr = pPart->Activate(CLSCTX_INPROC_SERVER, __uuidof(IDeviceSpecificProperty), (void**)&spDevSpec); - IF_FAILED_JUMP(hr, Exit); - - hr = spDevSpec->GetType(&vt); - IF_FAILED_JUMP(hr, Exit); - - if (vt == VT_BOOL) - { - pNewWidget = new CBooleanWidget(pPart, iid); - IF_TRUE_ACTION_JUMP((pNewWidget == NULL), hr = E_OUTOFMEMORY, Exit); - } - else if (vt == VT_I4) - { - pNewWidget = new CLongWidget<LONG>(pPart); - IF_TRUE_ACTION_JUMP((pNewWidget == NULL), hr = E_OUTOFMEMORY, Exit); - } - else if (vt == VT_UI4) - { - pNewWidget = new CLongWidget<ULONG>(pPart); - IF_TRUE_ACTION_JUMP((pNewWidget == NULL), hr = E_OUTOFMEMORY, Exit); - } - else - { - hr = HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED); - goto Exit; - } - } - - ATLASSERT(pNewWidget); - - posChk = m_lstWidgets.AddTail(pNewWidget); - if (posChk == NULL) - { - hr = E_OUTOFMEMORY; - SAFE_DELETE(pNewWidget); - } - -Exit: - return hr; -} - - -// ---------------------------------------------------------------------------- -// Function: -// CAdvEndpointPropPage::GetDeviceFriendlyName -// -// Description: -// Retrieves the endpoint's friendly name -// -// Parameters: -// ppNameOut - [out] The friendly name of the endpoint -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -HRESULT CAdvEndpointPropPage::GetDeviceFriendlyName -( - _Outptr_result_maybenull_ LPWSTR* ppNameOut -) -{ - HRESULT hr = S_OK; - CComPtr<IPropertyStore> spProperties; - PROPVARIANT var; - - IF_TRUE_ACTION_JUMP((m_pAudioExtParams == NULL), hr = E_POINTER, Exit); - IF_TRUE_ACTION_JUMP((ppNameOut == NULL), hr = E_POINTER, Exit); - - *ppNameOut = NULL; - - PropVariantInit(&var); - - if (m_pAudioExtParams->pEndpoint != NULL) - { - // Open the PropertyStore for read access - hr = m_pAudioExtParams->pEndpoint->OpenPropertyStore(STGM_READ, &spProperties); - IF_FAILED_JUMP(hr, Exit); - - // Retrieve the friendly name of the endpoint - hr = spProperties->GetValue(PKEY_Device_FriendlyName, &var); - if (SUCCEEDED(hr) && (var.vt == VT_LPWSTR)) - { - *ppNameOut = var.pwszVal; - } - else - { - PropVariantClear(&var); - } - } - -Exit: - return(hr); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CAdvEndpointPropPage::OnInitDialog -// -// Description: -// Dialog initialization routine -// -// Parameters: -// hwndDlg - [in] Handle to dialog box -// wParam - [in] Handle to control to receive the default keyboard focus -// lParam - [in] Specifies additional message-specific information -// -// Return values: -// TRUE to direct the system to set the keyboard focus to the control -// specified by wParam. Otherwise, it should return FALSE to prevent the -// system from setting the default keyboard focus. -// ---------------------------------------------------------------------------- -BOOL CAdvEndpointPropPage::OnInitDialog -( - HWND hwndDlg, - WPARAM wParam, - LPARAM lParam -) -{ - UNREFERENCED_PARAMETER(wParam); - UNREFERENCED_PARAMETER(lParam); - - LPWSTR pwstrEndpointName = NULL; - - LISTPOS pos; - CUIWidget* pWidget; - SRECT rcWidget(34, 144, 0, 0); - RECT rcDlg; - HRESULT hr = S_OK; - UINT id = 1800; - - // Retrieve the endpoint's friendly name - hr = GetDeviceFriendlyName(&pwstrEndpointName); - IF_FAILED_JUMP(hr, Exit); - - // Update the property page with retrieved information - SetWindowText(GetDlgItem(hwndDlg, IDC_EPP_ENDPOINT_NAME), pwstrEndpointName); - - // Initialize and create widgets - hr = InitializeWidgets(); - if (hr == E_NOTFOUND) - { - // If no widgets were found, show a message to depict that - SetWindowText(GetDlgItem(hwndDlg, IDC_NO_ADV_CONTROLS_FOUND), - L"No advanced controls found."); - } - else - { - // Create widget windows - ::GetClientRect(hwndDlg, &rcDlg); - rcWidget.w = rcDlg.right - rcDlg.left - 28; - rcWidget.h = 14; - - pos = m_lstWidgets.GetHeadPosition(); - while (pos) - { - pWidget = NULL; - m_lstWidgets.GetNext(pos, &pWidget); - - hr = pWidget->Create(hwndDlg, rcWidget, id); - if (SUCCEEDED(hr)) - { - id++; - - // offset to next widget - rcWidget.y = rcWidget.y + rcWidget.h + 12; - } - } - } - -Exit: - SAFE_COTASKMEMFREE(pwstrEndpointName); - return(FALSE); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CAdvEndpointPropPage::OnApply -// -// Description: -// Handle the pressing of the apply button -// -// Parameters: -// hwndDlg - [in] Handle to the dialog box -// wParam - [in] Handle to the control to receive the default keyboard focus -// lParam - [in] Specifies additional message-specific information -// -// Return values: -// TRUE to set keyboard focus on control -// ---------------------------------------------------------------------------- -BOOL CAdvEndpointPropPage::OnApply -( - HWND hwndDlg, - WPARAM wParam, - LPARAM lParam -) -{ - UNREFERENCED_PARAMETER(wParam); - UNREFERENCED_PARAMETER(lParam); - - CUIWidget* pWidget; - LISTPOS pos; - - pos = m_lstWidgets.GetHeadPosition(); - - while (pos) - { - pWidget = NULL; - m_lstWidgets.GetNext(pos, &pWidget); - pWidget->CommitValue(); - } - - SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR); - - return(TRUE); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CAdvEndpointPropPage::OnCheckBoxClicked -// -// Description: -// Handle the clicking of the check boxes -// -// Parameters: -// hwndDlg - [in] Handle to the dialog box -// wParam - [in] Handle to the control to receive the default keyboard focus -// lParam - [in] Specifies additional message-specific information -// -// Return values: -// FALSE to not set default keyboard focus -// ---------------------------------------------------------------------------- -BOOL CAdvEndpointPropPage::OnCheckBoxClicked -( - HWND hwndDlg, - WPARAM wParam, - LPARAM lParam -) -{ - UNREFERENCED_PARAMETER(lParam); - - CUIWidget* pWidget; - LISTPOS pos; - - pos = m_lstWidgets.GetHeadPosition(); - - while (pos) - { - pWidget = NULL; - m_lstWidgets.GetNext(pos, &pWidget); - - if (pWidget->OwnsCtrlId(LOWORD(wParam))) - { - pWidget->OnClick(); - } - } - - // Enable the Apply button upon user changing the control - SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); - - return(FALSE); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CAdvEndpointPropPage::DialogProcPage1 -// -// Description: -// Callback for property page -// -// Parameters: -// hwndDlg - [in] Handle to the dialog box -// uMsg - [in] Specifies the message -// wParam - [in] Specifies additional message-specific information -// lParam - [in] Specifies additional message-specific information -// -// Return values: -// TRUE if it processed the message, FALSE if not -// ---------------------------------------------------------------------------- -INT_PTR CALLBACK CAdvEndpointPropPage::DialogProcPage1 -( - HWND hwndDlg, - UINT uMsg, - WPARAM wParam, - LPARAM lParam -) -{ - CAdvEndpointPropPage* pthis = (CAdvEndpointPropPage*)(LONG_PTR)GetWindowLongPtr( - hwndDlg, GWLP_USERDATA); - BOOL fRet = FALSE; - - switch (uMsg) - { - case WM_INITDIALOG: - { - // Extract the context data from PROPSHEETPAGE::lParam - PROPSHEETPAGE* pSheetDesc = (PROPSHEETPAGE*)lParam; - - // Create the property page factory class -#pragma warning(push) -#pragma warning(disable: 28197) - pthis = new CComObject<CAdvEndpointPropPage>(); -#pragma warning(pop) - if (pthis == NULL) - { - return(FALSE); - } - - // Save this object in lParam - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)pthis); - - // Keep audio extension parameters passed by the control panel - pthis->m_pAudioExtParams = (AudioExtensionParams*)pSheetDesc->lParam; - - fRet = pthis->OnInitDialog(hwndDlg, wParam, lParam); - break; - } - - case WM_NOTIFY: - { - switch (((NMHDR FAR*)lParam)->code) - { - case PSN_APPLY: - if (pthis) - { - // Apply button pressed - fRet = pthis->OnApply(hwndDlg, wParam, lParam); - } - break; - } - break; - } - - case WM_COMMAND: - { - if (pthis) - { - // Check box clicked - fRet = pthis->OnCheckBoxClicked(hwndDlg, wParam, lParam); - } - break; - } - - case WM_DESTROY: - { - SAFE_DELETE(pthis); - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, NULL); - fRet = TRUE; - break; - } - } - - return(fRet); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CAdvEndpointPropPage::PropSheetPageProc -// -// Description: -// Callback that gets invoked right after page creation or right before -// before page destruction -// -// Parameters: -// hwnd - Reserved; must be NULL -// uMsg - [in] Action flag. PSPCB_ADDREF, PSPCB_CREATE, or PSPCB_RELEASE -// ppsp - [in, out] Pointer to a PROPSHEETPAGE structure that defines -// the page being created or destroyed. -// -// Return values: -// Depends on the value of the uMsg parameter -// ---------------------------------------------------------------------------- -UINT CALLBACK CAdvEndpointPropPage::PropSheetPageProc -( - HWND hwnd, - UINT uMsg, - LPPROPSHEETPAGE ppsp -) -{ - UNREFERENCED_PARAMETER(hwnd); - UNREFERENCED_PARAMETER(uMsg); - UNREFERENCED_PARAMETER(ppsp); - - // if (uMsg == PSPCB_CREATE) ... - return(1); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CAdvEndpointPropPage::Initialize -// -// Description: -// Implementation of IShellExtInit::Initialize. Initializes a property -// sheet extension, shortcut menu extension, or drag-and-drop handler. -// -// Parameters: -// pidlFolder - [in] Address of an ITEMIDLIST structure that uniquely -// identifies a folder. For property sheet extensions, -// this parameter is NULL. -// pdtobj - [out] Address of an IDataObject interface object that can be -// used to retrieve the objects being acted upon. -// hkeyProgID - [in] Registry key for the file object or folder type. -// -// Return values: -// Returns NOERROR if successful, or an OLE-defined error value otherwise -// ---------------------------------------------------------------------------- -_Use_decl_annotations_ -HRESULT CAdvEndpointPropPage::Initialize -( - LPCITEMIDLIST pidlFolder, - IDataObject* pdtobj, - HKEY hkeyProgID -) -{ - UNREFERENCED_PARAMETER(pidlFolder); - UNREFERENCED_PARAMETER(pdtobj); - UNREFERENCED_PARAMETER(hkeyProgID); - - return(S_OK); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CAdvEndpointPropPage::FindHostConnector -// -// Description: -// This method initiates a search for a software connector that supports -// the supplied format. If one is found, it returns a path to that -// connector. -// -// Parameters: -// pKsFormat - [in] Requested format -// cbFormat - [in] Size of format buffer in BYTEs -// bRejectMixedPaths - [in] If TRUE, stop looking if you find a mix unit -// ppPath - [out] The path to the Host pin -// -// Remarks: -// To get the host connector, just take the zeroth element in the -// resulting path -// -// Return: -// S_OK on success, E_NOTFOUND if not. Other error code indicates -// something unexpected. -// ---------------------------------------------------------------------------- -HRESULT CAdvEndpointPropPage::FindHostConnector -( - PKSDATAFORMAT pKsFormat, - ULONG cbFormat, - BOOL bRejectMixedPaths, - IPartsList** ppPath -) -{ - HRESULT hr; - CPartsList* pPathOut = NULL; - CComPtr<IDeviceTopology> spTopology; - UINT cConnectors; - CComPtr<IConnector> spEndpointConnector; - CComPtr<IConnector> spConStart; - CComQIPtr<IPart> spPartStart; - DataFlow flow; - UINT cDepth = 0; - CFormatExaminer* pExaminer = NULL; - - IF_TRUE_ACTION_JUMP((ppPath == NULL), hr = E_POINTER, Exit); - *ppPath = NULL; - - ATLASSERT(m_pAudioExtParams->pEndpoint != NULL); - - // Get IDeviceTopology interface for the Endpoint - hr = m_pAudioExtParams->pEndpoint->Activate(__uuidof(IDeviceTopology), CLSCTX_ALL, NULL, (void**)&spTopology); - IF_FAILED_JUMP(hr, Exit); - - // Get the connector to start searching from. By definition, an endpoint device can only have 1 connector. - hr = spTopology->GetConnectorCount(&cConnectors); - IF_FAILED_JUMP(hr, Exit); - - ATLASSERT(cConnectors == 1); - IF_TRUE_ACTION_JUMP((cConnectors != 1), hr = E_FAIL, Exit); - - // Since an endpoint device can only have 1 connector, get the connector at index 0 - hr = spTopology->GetConnector(0, &spEndpointConnector); - IF_FAILED_JUMP(hr, Exit); - - hr = spEndpointConnector->GetConnectedTo(&spConStart); - IF_FAILED_JUMP(hr, Exit); - - // get the dataflow (required by Search method) - hr = spConStart->GetDataFlow(&flow); - IF_FAILED_JUMP(hr, Exit); - - // QI for IPart (required by Search method) - spPartStart = spConStart; - - // Create an examiner that looks for a pin with the specified format - pExaminer = new CFormatExaminer(pKsFormat, cbFormat); - IF_TRUE_ACTION_JUMP((pExaminer == NULL), hr = E_OUTOFMEMORY, Exit); - - // Create a new parts list -#pragma warning(push) -#pragma warning(disable: 28197) - pPathOut = new CPartsList(); -#pragma warning(pop) - IF_TRUE_ACTION_JUMP((pPathOut == NULL), hr = E_OUTOFMEMORY, Exit); - - // Start looking - hr = Search(spPartStart, flow, pExaminer, pPathOut, cDepth, bRejectMixedPaths); - if (bRejectMixedPaths && (hr == E_NOTFOUND)) - { - // Don't actually reject mixed paths, just avoid them - hr = Search(spPartStart, flow, pExaminer, pPathOut, cDepth, FALSE); - } - IF_FAILED_JUMP(hr, Exit); - - hr = pPathOut->QueryInterface(__uuidof(IPartsList), (void**)ppPath); - -Exit: - SAFE_RELEASE(pPathOut); - - SAFE_DELETE(pExaminer); - - return hr; -} - - -// ---------------------------------------------------------------------------- -// Function: -// CAdvEndpointPropPage::Search -// -// Description: -// Searches the device topology for parts that satisfy the supplied -// examiner. -// -// Parameters: -// pPartStart - [in] The IPart to start looking at -// flowStart - [in] The flow of the starting part. This never changes -// so it is passed as an argument. -// pExaminer - [in] The examiner that tests each IPart against some criteria -// pPathAggregate - [out] The cumulative path that has been searched -// cDepth - [in] Stop looking if we reach this recursion depth -// bRejectMixedPaths - [in] If TRUE, then stop looking if we encounter a -// MIX unit -// -// Remarks: -// The search may span several FunctionInstances connected by DeviceModel -// IConnections. The algorithm works as follows: -// -// 1) Each connector in the model is tested against the following -// (in order): -// a) Is the flow opposite that of the starting part? -// If no then goto next connector. -// b) Does there exist a path from the starting part to this -// connector? If no then goto next connector. -// c) Is the supplied examiner satisfied by the path? -// If yes, then return. -// d) Is this connector connected to another connector? -// If yes, then add the connector to a list of "deferred -// connectors" to be checked if no other connectors in this model -// satisfy (c) -// -// 2) If the function still hasn't returned, then for each connector in -// the list generated in step 1d: -// a) Get the connector that it is connected to -// b) Recurse into this function with "that" connector as the starting -// part -// -// The point of the list of "deferred connectors" is to minimize the -// length of the paths that we find. e.g. if two viable paths exist, one -// (A) which spans 3 models, and another (B) which spans only 2, then B -// will be found first, regardless of the ordering of connections in the -// models involved. -// -// Note that when a path is found, all of the parts involved in that path -// are aggregated into pPathAggregate IN REVERSE ORDER. In general, all -// the parts in pPathAggregate will not belong to a single model, so when -// using pPathAggregate, you must use IPart::GetTopologyObject to get the -// model and/or FunctionInstance of the part (i.e. don't cache the value -// of either). -// -// Return: -// S_OK if successful -// ---------------------------------------------------------------------------- -HRESULT CAdvEndpointPropPage::Search -( - IPart* pPartStart, - DataFlow flowStart, - IExaminer* pExaminer, - CPartsList* pPathAggregate, - UINT cDepth, - BOOL bRejectMixedPaths -) -{ - HRESULT hr = S_OK; - TList<IConnector> lstDeferredConnectors; - BOOL bHaveViableConnector = FALSE; - - { - CComPtr<IDeviceTopology> spTopology; - UINT cConnectors; - - // Bail if we are recursing too deep - IF_TRUE_ACTION_JUMP((cDepth == MAX_SEARCH_DEPTH), hr = E_NOTFOUND, Exit); - - // Get DeviceModel and DeviceModelUtil interfaces associated with pPartStart. - // We can't just pass these as params, because each time this function is called - // recursively, we are talking about a part (pPartStart) on a different device. - hr = pPartStart->GetTopologyObject(&spTopology); - IF_FAILED_JUMP(hr, Exit); - - // - // [Step 1] Examine each connector. - // - hr = spTopology->GetConnectorCount(&cConnectors); - IF_FAILED_JUMP(hr, Exit); - - for (UINT c = 0; (c < cConnectors) && !bHaveViableConnector; c++) - { - CComPtr<IConnector> spConTest; - DataFlow flowTest; - CComPtr<IPartsList> spPath; - CComPtr<IPart> spPartTest; - BOOL bConnectorIsConnected; - - hr = spTopology->GetConnector(c, &spConTest); - IF_FAILED_JUMP(hr, Exit); - - hr = spConTest->GetDataFlow(&flowTest); - IF_FAILED_JUMP(hr, Exit); - - // [1a] We only care about connectors whose dataflow is opposite that of pConStart - // (i.e. on the other side of the topology) - if (flowTest == flowStart) - continue; - - // QI for IPart - spPartTest = spConTest; - - ATLASSERT(spPartTest); - IF_TRUE_ACTION_JUMP((spPartTest == NULL), hr = E_NOINTERFACE, Exit); - - // [1b] See if there exists a path from one to the other - hr = spTopology->GetSignalPath(pPartStart, spPartTest, bRejectMixedPaths, &spPath); - - // If no path exists from here to there, then try the next connector - if (hr != S_OK) - continue; - - // [1c] Let pExaminer take a look at this path, but don't worry if it fails - pExaminer->Examine(spPath); - - // See if pExaminer has found what it was looking for yet - if (pExaminer->IsSatisfied()) - { - bHaveViableConnector = TRUE; - - // add all of the parts in spPath to pPathAggregate - hr = pPathAggregate->AddParts(spPath); - break; - } - - // [1d] See if the connector is connected. If so, add to the list of deferred - // connectors - hr = spConTest->IsConnected(&bConnectorIsConnected); - - if (SUCCEEDED(hr) && bConnectorIsConnected) - { - LISTPOS posChk; - IConnector* pConDeferred; - - // Get another interface pointer that is NOT a CComPtr, so it doesn't - // get released until we want (note that .Detach means that when spConTest - // goes out of scope it won't release the interface) - pConDeferred = spConTest.Detach(); - - // Add to list of connectors to look more closely at - posChk = lstDeferredConnectors.AddTail(pConDeferred); - - if (posChk == NULL) - { - hr = E_OUTOFMEMORY; - pConDeferred->Release(); - goto Exit; - } - } - } - - if (!bHaveViableConnector) - { - // - // [Step 2] Jump to connected devices and test them. - // - - LISTPOS pos = lstDeferredConnectors.GetHeadPosition(); - - while (pos != NULL) - { - CComPtr<IConnector> spConConnectedTo; - IConnector* pConDeferred = NULL; // this will be cleaned up at the end of the function - CComPtr<IPart> spPartConnectedTo; - CComPtr<IPartsList> spPath; - CComQIPtr<IPart> spPartDeferred; - - // Get the deferred connector. RefCount should be 1 - lstDeferredConnectors.GetNext(pos, &pConDeferred); - - // Get the part (a connector) that this connector is connected to - hr = pConDeferred->GetConnectedTo(&spConConnectedTo); - IF_FAILED_JUMP(hr, Exit); - - // Search that device model as well. Note that we can just reuse the dataflow here - spPartConnectedTo = spConConnectedTo; - ATLASSERT(spPartConnectedTo != NULL); - IF_TRUE_ACTION_JUMP((spPartConnectedTo == NULL), hr = E_NOINTERFACE, Exit); - - // Recursion - hr = Search(spPartConnectedTo, flowStart, pExaminer, pPathAggregate, cDepth + 1, bRejectMixedPaths); - if (FAILED(hr)) - continue; - - // We found what we were looking for! - bHaveViableConnector = TRUE; - - // We need to figure out how we got here again and add that path to pPath - spPartDeferred = pConDeferred; - ATLASSERT(spPartDeferred != NULL); - - // Note: If we fail past here, pPathAggregate will contain some parts. These will - // be cleaned up by CPartsList destructor - IF_TRUE_ACTION_JUMP((spPartDeferred == NULL), hr = E_NOINTERFACE, Exit); - - hr = spTopology->GetSignalPath(pPartStart, spPartDeferred, bRejectMixedPaths, &spPath); - IF_FAILED_JUMP(hr, Exit); - - // Add all of the parts in spPath to pPathAggregate - hr = pPathAggregate->AddParts(spPath); - IF_FAILED_JUMP(hr, Exit); - - break; - } - } - } - -Exit: - // Cleanup - IConnector* pConDelete; - while (lstDeferredConnectors.RemoveHead(&pConDelete)) - { - SAFE_RELEASE(pConDelete); - } - - // Adjust result. If there were no errors, but we didn't find what - // we were searching for, then return "not found" - if (SUCCEEDED(hr) && (!bHaveViableConnector)) - { - hr = E_NOTFOUND; - } - - return hr; -} - - -// ---------------------------------------------------------------------------- -// Function: -// CAdvEndpointPropPage::InitializeWidgets -// -// Description: -// Looks for parts in the path that support any of these control -// interfaces: -// -- IAudioLoudness -// -- IAudioAutoGainControl -// -- IDeviceSpecificProperty -// -// Return: -// S_OK if at least one control found -// E_NOTFOUND if no controls found -// other if unexpected error -// -// --------------------------------------------------------------------------- -HRESULT CAdvEndpointPropPage::InitializeWidgets() -{ - HRESULT hr = S_OK; - HRESULT hrWarn = S_OK; - CComPtr<IPartsList> spPath; - UINT cParts; - BOOL bFoundSomething = FALSE; - UINT nCtrlId = 900; - - // Note: Can use the endpoint format instead of this ... - KSDATAFORMAT format; - ZeroMemory(&format, sizeof(format)); - - format.FormatSize = sizeof(KSDATAFORMAT); - format.MajorFormat = KSDATAFORMAT_TYPE_AUDIO; - format.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; - format.Specifier = KSDATAFORMAT_SPECIFIER_WAVEFORMATEX; - - // See if we can find a path to any old PCM host pin by only passing sizeof(KSDATAFORMAT) - hr = FindHostConnector(&format, sizeof(KSDATAFORMAT), FALSE, &spPath); - IF_FAILED_JUMP(hr, Exit); - - // - hr = spPath->GetCount(&cParts); - IF_FAILED_JUMP(hr, Exit); - - // Look for parts that support any of the interfaces in s_rgAdvCtrlInterfaces - for (UINT i = 0; i < cParts; i++) - { - UINT cInterfaces; - CComPtr<IPart> spPart; - - hr = spPath->GetPart(i, &spPart); - IF_FAILED_JUMP(hr, Exit); - - hr = spPart->GetControlInterfaceCount(&cInterfaces); - IF_FAILED_JUMP(hr, Exit); - - for (UINT j = 0; j < cInterfaces; j++) - { - CComPtr<IControlInterface> spInterfaceDesc; - GUID iid; - - hr = spPart->GetControlInterface(j, &spInterfaceDesc); - IF_FAILED_JUMP(hr, Exit); - - hr = spInterfaceDesc->GetIID(&iid); - IF_FAILED_JUMP(hr, Exit); - - for (int k = 0; k < ARRAYSIZE(s_rgAdvCtrlInterfaces); k++) - { - if (iid == s_rgAdvCtrlInterfaces[k]) - { - bFoundSomething = TRUE; - - hrWarn = MakeNewWidget(spPart, iid, nCtrlId++); - } - } - } - } - - if (!bFoundSomething) - { - hr = E_NOTFOUND; - } - -Exit: - return(hr); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CAdvEndpointPropPage::AddPages -// -// Description: -// Implementation of IShellPropSheetExt::AddPages. Adds one or more pages -// to a property sheet that the Shell displays for a file object. -// -// Parameters: -// lpfnAddPage - [in] Address of a function that the property sheet -// handler calls to add a page to the property sheet. The -// function takes a property sheet handle returned by the -// CreatePropertySheetPage function and the lParam parameter -// passed to the AddPages method. -// lParam - [in] Parameter to pass to the function specified by the -// lpfnAddPage method. -// -// Return values: -// Returns S_OK if successful. If the method fails, an OLE-defined error -// code is returned -// ---------------------------------------------------------------------------- -_Use_decl_annotations_ -HRESULT STDMETHODCALLTYPE CAdvEndpointPropPage::AddPages -( - LPFNADDPROPSHEETPAGE lpfnAddPage, // See PrSht.h - LPARAM lParam // Used by caller, don't modify -) -{ - HRESULT hr = S_OK; - PROPSHEETPAGE psp; - HPROPSHEETPAGE hPage1 = NULL; - AudioExtensionParams* pAudioParams = (AudioExtensionParams*)lParam; -#pragma warning(push) -#pragma warning(disable: 28197) - AudioExtensionParams* pAudioParamsCopy = new AudioExtensionParams; -#pragma warning(pop) - - if (pAudioParamsCopy == NULL) - { - return E_OUTOFMEMORY; - } - - // Make a copy of the params - CopyMemory(pAudioParamsCopy, pAudioParams, sizeof(AudioExtensionParams)); - SAFE_ADDREF(pAudioParams->pEndpoint); - SAFE_ADDREF(pAudioParams->pPnpInterface); - SAFE_ADDREF(pAudioParams->pPnpDevnode); - - // Initialize property page params and create page - psp.dwSize = sizeof(psp); - psp.dwFlags = PSP_USEREFPARENT | PSP_USECALLBACK; - psp.hInstance = _AtlBaseModule.GetModuleInstance(); - psp.hIcon = 0; - psp.pcRefParent = (UINT*)&m_dwRef; - psp.lParam = (LPARAM)pAudioParamsCopy; - psp.pszTemplate = MAKEINTRESOURCE(IDD_ADV_ENDPOINT_PROP_PAGE); - psp.pfnDlgProc = (DLGPROC)DialogProcPage1; - psp.pfnCallback = PropSheetPageProc; - - // Create the property sheet page and add the page - hPage1 = CreatePropertySheetPage(&psp); - if (hPage1) - { - if (!lpfnAddPage(hPage1, pAudioParams->AddPageParam)) - { - hr = E_FAIL; - delete pAudioParamsCopy; - DestroyPropertySheetPage(hPage1); - } - else - { - // Add ref for page - this->AddRef(); - } - } - else - { - delete pAudioParamsCopy; - hr = E_OUTOFMEMORY; - } - - return(hr); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CAdvEndpointPropPage::ReplacePage -// -// Description: -// Implementation of IShellPropSheetExt::ReplacePage. Replaces a page in -// a property sheet for a Control Panel object. -// -// Parameters: -// uPageID - [in] Identifier of the page to replace -// lpfnReplacePage - [in] Address of a function that the property sheet -// handler calls to replace a page to the property -// sheet. The function takes a property sheet handle -// returned by the CreatePropertySheetPage function and -// the lParam parameter passed to the ReplacePage -// method. -// lParam - [in] Parameter to pass to the function specified by the -// lpfnReplacePage parameter. -// -// Return values: -// Returns NOERROR if successful, or an OLE-defined error value otherwise -// ---------------------------------------------------------------------------- -_Use_decl_annotations_ -HRESULT STDMETHODCALLTYPE CAdvEndpointPropPage::ReplacePage -( - UINT uPageID, - LPFNSVADDPROPSHEETPAGE lpfnReplaceWith, - LPARAM lParam -) -{ - UNREFERENCED_PARAMETER(uPageID); - UNREFERENCED_PARAMETER(lpfnReplaceWith); - UNREFERENCED_PARAMETER(lParam); - - return(S_FALSE); -} diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/AdvEndpointPropPage.h b/audio/sysvad/SwapAPO/PropPageExtensions/AdvEndpointPropPage.h deleted file mode 100644 index 0d02ef97..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/AdvEndpointPropPage.h +++ /dev/null @@ -1,74 +0,0 @@ -//**@@@*@@@**************************************************** -// -// Microsoft Windows -// Copyright (C) Microsoft Corporation. All rights reserved. -// -//**@@@*@@@**************************************************** - -// -// FileName: AdvEndpointPropPage.h -// -// Abstract: Declaration of the CAdvEndpointPropPage class -// -// ---------------------------------------------------------------------------- - - -#pragma once - - -class ATL_NO_VTABLE CAdvEndpointPropPage : - public CComObjectRootEx<CComSingleThreadModel>, - public CComCoClass<CAdvEndpointPropPage, &CLSID_AdvEndpointPropPage>, - public IDispatchImpl<IAdvEndpointPropPage, &__uuidof(IAdvEndpointPropPage), &LIBID_CplExtLib, /*wMajor =*/ 1, /*wMinor =*/ 0>, - public IShellExtInit, - public IShellPropSheetExt -{ -public: - CAdvEndpointPropPage(); - ~CAdvEndpointPropPage(); - - DECLARE_REGISTRY_RESOURCEID(IDR_ADV_ENDPOINT_PROP_PAGE) - - BEGIN_COM_MAP(CAdvEndpointPropPage) - COM_INTERFACE_ENTRY(IAdvEndpointPropPage) - COM_INTERFACE_ENTRY(IDispatch) - COM_INTERFACE_ENTRY(IShellExtInit) - COM_INTERFACE_ENTRY(IShellPropSheetExt) - END_COM_MAP() - - DECLARE_PROTECT_FINAL_CONSTRUCT() - - HRESULT FinalConstruct() - { - return S_OK; - } - - void FinalRelease() - { - } - - static INT_PTR CALLBACK DialogProcPage1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); - static UINT CALLBACK PropSheetPageProc(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp); - - // IShellExtInit - STDMETHOD(Initialize)(_In_opt_ LPCITEMIDLIST pidlFolder, _In_opt_ IDataObject* pdtobj, _In_opt_ HKEY hkeyProgID); - - // IShellPropSheetExt - STDMETHOD(AddPages)(_In_ LPFNADDPROPSHEETPAGE lpfnAddPage, _In_ LPARAM lParam); - STDMETHOD(ReplacePage)(_In_ UINT uPageID, _In_ LPFNSVADDPROPSHEETPAGE lpfnReplaceWith, _In_ LPARAM lParam); - -private: - AudioExtensionParams* m_pAudioExtParams; - TList<CUIWidget> m_lstWidgets; - - HRESULT FindHostConnector(PKSDATAFORMAT pKsFormat, ULONG cbFormat, BOOL bRejectMixedPaths, IPartsList** ppPath); - HRESULT Search(IPart* pStart, DataFlow flowStart, IExaminer* pExaminer, CPartsList* pPath, UINT cDepth, BOOL bRejectMixedPaths); - HRESULT InitializeWidgets(); - HRESULT GetDeviceFriendlyName(_Outptr_result_maybenull_ LPWSTR* ppNameOut); - HRESULT MakeNewWidget(IPart* pPart, REFIID iid, UINT nCtrlId); - BOOL OnInitDialog (HWND hwndDlg, WPARAM wParam, LPARAM lParam); - BOOL OnApply(HWND hwndDlg, WPARAM wParam, LPARAM lParam); - BOOL OnCheckBoxClicked(HWND hwndDlg, WPARAM wParam, LPARAM lParam); -}; - -OBJECT_ENTRY_AUTO(__uuidof(AdvEndpointPropPage), CAdvEndpointPropPage) diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/AdvEndpointPropPage.rgs b/audio/sysvad/SwapAPO/PropPageExtensions/AdvEndpointPropPage.rgs deleted file mode 100644 index eecbc126..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/AdvEndpointPropPage.rgs +++ /dev/null @@ -1,27 +0,0 @@ -HKCR -{ - CplExt.AdvEndpointPropPage.1 = s 'AdvEndpointPropPage Class' - { - CLSID = s '{6C57B2A2-91F5-4b90-93D5-FAB82485ECA6}' - } - CplExt.AdvEndpointPropPage = s 'AdvEndpointPropPage Class' - { - CLSID = s '{6C57B2A2-91F5-4b90-93D5-FAB82485ECA6}' - CurVer = s 'CplExt.AdvEndpointPropPage.1' - } - NoRemove CLSID - { - ForceRemove {6C57B2A2-91F5-4b90-93D5-FAB82485ECA6} = s 'AdvEndpointPropPage Class' - { - ProgID = s 'CplExt.AdvEndpointPropPage.1' - VersionIndependentProgID = s 'CplExt.AdvEndpointPropPage' - ForceRemove 'Programmable' - InprocServer32 = s '%MODULE%' - { - val ThreadingModel = s 'Apartment' - } - val AppID = s '%APPID%' - 'TypeLib' = s '{59390583-ED40-46D9-9B16-7800B9CC5CC2}' - } - } -} diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/CplExt.cpp b/audio/sysvad/SwapAPO/PropPageExtensions/CplExt.cpp deleted file mode 100644 index b64d51a2..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/CplExt.cpp +++ /dev/null @@ -1,73 +0,0 @@ -//**@@@*@@@**************************************************** -// -// Microsoft Windows -// Copyright (C) Microsoft Corporation. All rights reserved. -// -//**@@@*@@@**************************************************** - -// -// FileName: CplExt.cpp -// -// Abstract: Implementation of DLL Exports -// -// ---------------------------------------------------------------------------- - - -#include "stdafx.h" - -_Analysis_mode_(_Analysis_code_type_user_driver_) - -HINSTANCE g_hInstance = NULL; - - -class CCplExtModule : public CAtlDllModuleT< CCplExtModule > -{ -public : - DECLARE_LIBID(LIBID_CplExtLib) - DECLARE_REGISTRY_APPID_RESOURCEID(IDR_CPL_EXT, "{A7D2EC8B-B70F-434C-A0CE-0DF324805F7D}") -}; - -CCplExtModule _AtlModule; - - -// DLL Entry Point -extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) -{ - g_hInstance = hInstance; - return _AtlModule.DllMain(dwReason, lpReserved); -} - - -// Used to determine whether the DLL can be unloaded by OLE -__control_entrypoint(DllExport) -STDAPI DllCanUnloadNow(void) -{ - return _AtlModule.DllCanUnloadNow(); -} - - -// Returns a class factory to create an object of the requested type -_Check_return_ -STDAPI DllGetClassObject(_In_ REFCLSID rclsid, _In_ REFIID riid, _Outptr_ LPVOID FAR* ppv) -{ - return _AtlModule.DllGetClassObject(rclsid, riid, ppv); -} - - -// DllRegisterServer - Adds entries to the system registry -__control_entrypoint(DllExport) -STDAPI DllRegisterServer(void) -{ - // registers object, typelib and all interfaces in typelib - HRESULT hr = _AtlModule.DllRegisterServer(); - return hr; -} - - -// DllUnregisterServer - Removes entries from the system registry -__control_entrypoint(DllExport) -STDAPI DllUnregisterServer(void) -{ - HRESULT hr = _AtlModule.DllUnregisterServer(); - return hr; -} diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/CplExt.idl b/audio/sysvad/SwapAPO/PropPageExtensions/CplExt.idl deleted file mode 100644 index 3254cbd8..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/CplExt.idl +++ /dev/null @@ -1,73 +0,0 @@ -//**@@@*@@@**************************************************** -// -// Microsoft Windows -// Copyright (C) Microsoft Corporation. All rights reserved. -// -//**@@@*@@@**************************************************** - -// -// FileName: CplExt.idl -// -// Abstract: IDL source for CplExt. This file will be processed by the -// MIDL tool to produce the type library (CplExt.tlb) and -// marshalling code. -// -// ---------------------------------------------------------------------------- - - -import "oaidl.idl"; -import "ocidl.idl"; - -[ - object, - uuid(E6DB299B-B925-415A-879B-4A76D072F39A), - dual, - nonextensible, - helpstring("ISwapPropPage Interface"), - pointer_default(unique) -] -interface ISwapPropPage : IDispatch{ -}; - - -[ - object, - uuid(D379F7FB-66E0-427f-890D-1F479AD73B4B), - dual, - nonextensible, - helpstring("IAdvEndpointPropPage Interface"), - pointer_default(unique) -] -interface IAdvEndpointPropPage : IDispatch{ -}; - - -[ - uuid(59390583-ED40-46D9-9B16-7800B9CC5CC2), - version(1.0), - helpstring("CplExt 1.0 Type Library") -] -library CplExtLib -{ - importlib("stdole2.tlb"); - - // For Swap Property Page - [ - uuid(19166F23-5F08-47F9-BB57-9F57A977D88E), - helpstring("SwapPropPage Class") - ] - coclass SwapPropPage - { - [default] interface ISwapPropPage; - }; - - // For Advanced Endpoint Property Page - [ - uuid(6C57B2A2-91F5-4b90-93D5-FAB82485ECA6), - helpstring("AdvEndpointPropPage Class") - ] - coclass AdvEndpointPropPage - { - [default] interface IAdvEndpointPropPage; - }; -}; diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/CplExt.rc b/audio/sysvad/SwapAPO/PropPageExtensions/CplExt.rc deleted file mode 100644 index 415ed22e..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/CplExt.rc +++ /dev/null @@ -1,208 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "1 TYPELIB ""cplext.tlb""\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", "TODO: <Company name>" - VALUE "FileDescription", "TODO: <File description>" - VALUE "FileVersion", "1.0.0.1" - VALUE "InternalName", "CplExt.dll" - VALUE "LegalCopyright", "TODO: (c) <Company name>. All rights reserved." - VALUE "OriginalFilename", "CplExt.dll" - VALUE "ProductName", "TODO: <Product name>" - VALUE "ProductVersion", "1.0.0.1" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// REGISTRY -// - -IDR_CPL_EXT REGISTRY "CplExt.rgs" -IDR_SWAP_PROP_PAGE REGISTRY "SwapPropPage.rgs" -IDR_ADV_ENDPOINT_PROP_PAGE REGISTRY "AdvEndpointPropPage.rgs" - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_SWAP_PROP_PAGE DIALOGEX 0, 0, 284, 246 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE | - WS_CAPTION | WS_SYSMENU -CAPTION "System Effects - Sample" -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_SPP_ENDPOINT_NAME,19,34,211,8 - CONTROL "&Disable System Effects",IDC_DISABLE_SYSFX,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,22,92,89,8 - CONTROL "Enable Channel Swap &SFX",IDC_ENABLE_SWAP_SFX,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,22,112,98,8 - CONTROL "Enable Channel Swap &MFX",IDC_ENABLE_SWAP_MFX,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,22,132,99,8 - CONTROL "Enable D&elay SFX",IDC_ENABLE_DELAY_SFX,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,22,152,98,8 - CONTROL "Enable Del&ay MFX",IDC_ENABLE_DELAY_MFX,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,22,172,99,8 - GROUPBOX "Endpoint Name",IDC_STATIC,7,18,270,37 - GROUPBOX "System Effects Configuration",IDC_STATIC,7,71,270,132 -END - -IDD_ADV_ENDPOINT_PROP_PAGE DIALOGEX 0, 0, 284, 244 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_CHILD | WS_CAPTION | - WS_SYSMENU -CAPTION "Custom - Sample" -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_EPP_ENDPOINT_NAME,19,34,211,8 - LTEXT "",IDC_NO_ADV_CONTROLS_FOUND,20,90,232,9 - GROUPBOX "Endpoint Name",IDC_STATIC,7,18,270,37 - GROUPBOX "Advanced Controls",IDC_STATIC,7,71,270,154 -END - -IDD_WIDGET_GEN_LONG DIALOGEX 0, 0, 200, 12 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE -EXSTYLE WS_EX_STATICEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - RTEXT "L",IDC_GEN_LABEL,0,2,94,8 - CONTROL "",IDC_GEN_SLIDER,"msctls_trackbar32",TBS_BOTH | - TBS_NOTICKS | WS_TABSTOP | 0x400,96,0,76,13 - RTEXT "-6 dB",IDC_GEN_VALUE,174,1,24,10,0,WS_EX_STATICEDGE -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_SWAP_PROP_PAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 277 - TOPMARGIN, 7 - BOTTOMMARGIN, 239 - END - - IDD_ADV_ENDPOINT_PROP_PAGE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 277 - TOPMARGIN, 7 - BOTTOMMARGIN, 237 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_AUDIO_ICON ICON "music.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE -BEGIN - IDS_PROJ_NAME "CplExt" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -1 TYPELIB "cplext.tlb" - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/CplExt.rgs b/audio/sysvad/SwapAPO/PropPageExtensions/CplExt.rgs deleted file mode 100644 index 1c97b062..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/CplExt.rgs +++ /dev/null @@ -1,11 +0,0 @@ -HKCR -{ - NoRemove AppID - { - '%APPID%' = s 'CplExt' - 'CplExt.DLL' - { - val AppID = s '%APPID%' - } - } -} diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/Parts.cpp b/audio/sysvad/SwapAPO/PropPageExtensions/Parts.cpp deleted file mode 100644 index 41130ead..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/Parts.cpp +++ /dev/null @@ -1,298 +0,0 @@ -//**@@@*@@@**************************************************** -// -// Microsoft Windows DevTopo.dll -// Copyright (C) Microsoft Corporation. All rights reserved. -// -//**@@@*@@@**************************************************** - -// -// FileName: Parts.cpp -// -// Abstract: Implementation of CPart and derived classes. -// -// -------------------------------------------------------------------------------- - -#include "stdafx.h" -#include <DeviceTopology.h> -#include "Parts.h" - -_Analysis_mode_(_Analysis_code_type_user_driver_) - -// ---------------------------------------------------------------------- -// Function: -// CPartsList::CPartsList -// -// Description: -// CPartsList constructor -// ---------------------------------------------------------------------- -CPartsList::CPartsList() : - m_refCount(1) -{ -} - - -// ---------------------------------------------------------------------- -// Function: -// CPartsList::~CPartsList -// -// Description: -// CPartsList destructor -// ---------------------------------------------------------------------- -CPartsList::~CPartsList() -{ - ATLASSERT(m_refCount == 0); - - IPart* pIPart; - while (m_lstParts.RemoveHead(&pIPart)) - { - SAFE_RELEASE(pIPart); - } -} - - -// ---------------------------------------------------------------------- -// Function: -// CPartsList::QueryInterface -// -// Description: -// Implementation of IUnknown::QueryInterface -// -// Parameters: -// riid - [in] Identifier of the interface being queried -// ppvObj - [in] Pointer to a buffer that receives a pointer to the -// object whose interface is queried -// -// Return: -// S_OK if successful -// ---------------------------------------------------------------------- -STDMETHODIMP CPartsList::QueryInterface -( - const IID& iid, - void** ppUnk -) -{ - if (!ppUnk) - return E_POINTER; - - HRESULT hr = E_NOINTERFACE; - *ppUnk = NULL; - - if (iid == __uuidof(IPartsList)) - { - *ppUnk = (IPartsList*)this; - hr = S_OK; - AddRef(); - } - else - if (iid == __uuidof(IUnknown)) - { - *ppUnk = (IUnknown*)this; - hr = S_OK; - AddRef(); - } - - return hr; -} - - -// ---------------------------------------------------------------------- -// Function: -// CPartsList::AddRef -// -// Description: -// Implementation of IUnknown::AddRef -// -// Return: -// New refcount -// ---------------------------------------------------------------------- -ULONG STDMETHODCALLTYPE CPartsList::AddRef(void) -{ - return InterlockedIncrement(&m_refCount); -} - - -// ---------------------------------------------------------------------- -// Function: -// CPartsList::Release -// -// Description: -// Implementation of IUnknown::Release -// -// Return: -// New refcount -// ---------------------------------------------------------------------- -ULONG STDMETHODCALLTYPE CPartsList::Release(void) -{ - ATLASSERT(m_refCount > 0); - LONG lRef = InterlockedDecrement(&m_refCount); - ATLASSERT(lRef >= 0); - - if (lRef == 0) - { - delete this; - } - return lRef; -} - - -// ---------------------------------------------------------------------- -// Function: -// CPartsList::AddPart -// -// Description: -// Adds an item to the list of IPart interfaces -// -// Parameters: -// pIPart - [in] Part to add to the list -// -// Return: -// S_OK if successful -// ---------------------------------------------------------------------- -STDMETHODIMP CPartsList::AddPart -( - IPart* pIPart -) -{ - if (pIPart == NULL) - return E_POINTER; - - // Protect m_lstParts access - m_CritSection.Enter(); - - pIPart->AddRef(); - m_lstParts.AddTail(pIPart); - - m_CritSection.Leave(); - - return S_OK; -} - - -// ---------------------------------------------------------------------- -// Function: -// CPartsList::AddPart -// -// Description: -// Adds the PartsList Parts to the list of IPart interfaces -// -// Parameters: -// pIParts - [in] List of Parts to be added to the list -// -// Return: -// S_OK if successful -// ---------------------------------------------------------------------- -STDMETHODIMP CPartsList::AddParts -( - IPartsList* pIParts -) -{ - ATLASSERT(pIParts != NULL); - - HRESULT hr = S_OK; - UINT i, cParts = 0; - - // Protect m_lstParts - m_CritSection.Enter(); - - // Loop through specified parts list - hr = pIParts->GetCount(&cParts); - IF_FAILED_JUMP(hr, Exit); - - for (i = 0; (i < cParts) && (hr == S_OK); i++) - { - IPart* pIPart; - - // ... and copy reference to each part - hr = pIParts->GetPart(i, &pIPart); - IF_FAILED_JUMP(hr, Exit); - - // ... to this list - m_lstParts.AddTail(pIPart); - } - -Exit: - m_CritSection.Leave(); - - return hr; -} - - -// ---------------------------------------------------------------------- -// Function: -// CPartsList::GetCount -// -// Description: -// Returns the count of items in the list of IParts -// -// Parameters: -// pCount - [out] the count of parts in this list -// -// Return: -// S_OK if successful -// -// ---------------------------------------------------------------------- -_Use_decl_annotations_ -STDMETHODIMP CPartsList::GetCount -( - UINT* pCount -) -{ - if (pCount == NULL) - return E_POINTER; - - // Protect m_lstParts access - m_CritSection.Enter(); - - *pCount = m_lstParts.GetCount(); - - m_CritSection.Leave(); - - return S_OK; -} - - -// ---------------------------------------------------------------------- -// Function: -// CPartsList::GetPart -// -// Description: -// Returns the nIndex-th item in the list of IParts -// -// Parameters: -// nIndex - [in] index of the part to access -// uMsg - [out] the part at the specified index -// -// Return: -// S_OK if successful -// -// ---------------------------------------------------------------------- -_Use_decl_annotations_ -STDMETHODIMP CPartsList::GetPart -( - UINT nIndex, - IPart** ppPart -) -{ - HRESULT hr; - IPart* pIPart = NULL; - - // Protect m_lstParts access - m_CritSection.Enter(); - - IF_TRUE_ACTION_JUMP((ppPart == NULL), hr = E_POINTER, Exit); - - *ppPart = NULL; - - IF_TRUE_ACTION_JUMP((nIndex >= m_lstParts.GetCount()), hr = E_INVALIDARG, Exit); - - IF_TRUE_ACTION_JUMP((!m_lstParts.GetAt(nIndex, &pIPart)), hr = E_NOTFOUND, Exit); - - // Take care of AddRef and ensure correct interface in one shot - hr = pIPart->QueryInterface(__uuidof(IPart), reinterpret_cast<void**>(ppPart)); - IF_FAILED_JUMP(hr, Exit); - -Exit: - m_CritSection.Leave(); - - return hr; -} diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/Parts.h b/audio/sysvad/SwapAPO/PropPageExtensions/Parts.h deleted file mode 100644 index 1cad63f5..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/Parts.h +++ /dev/null @@ -1,49 +0,0 @@ -//**@@@*@@@**************************************************** -// -// Microsoft Windows DevTopo.dll -// Copyright (C) Microsoft Corporation. All rights reserved. -// -//**@@@*@@@**************************************************** - -// -// FileName: Parts.h -// -// Abstract: CPartsList is a list container of parts -// -// -------------------------------------------------------------------------------- - -#pragma once - - -class CPartsList : public IPartsList -{ -private: - - // This is a REAL refcount. When it goes to zero, the object is destroyed. - LONG m_refCount; - TList<IPart> m_lstParts; - - CCriticalSection m_CritSection; - -protected: - ~CPartsList(); // Refcounted objects should have a private destructor. - -public: - CPartsList(); - - STDMETHOD(AddPart)(IPart* pIPart); - STDMETHOD(AddParts)(IPartsList* pIParts); - -public: - - // IPartsList - STDMETHOD(GetCount)(_Out_ UINT* pCount); - STDMETHOD(GetPart)(_In_ UINT nIndex, _Out_ IPart** ppPart); - - // IUnknown - HRESULT STDMETHODCALLTYPE QueryInterface(const IID& iid, void** ppUnk); - ULONG STDMETHODCALLTYPE AddRef(void); - ULONG STDMETHODCALLTYPE Release(void); - - friend class CDeviceTopology; -}; diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/PropPageExt.def b/audio/sysvad/SwapAPO/PropPageExtensions/PropPageExt.def deleted file mode 100644 index aa2797ce..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/PropPageExt.def +++ /dev/null @@ -1,9 +0,0 @@ -; PropPageExt.def : Declares the module parameters. - -LIBRARY "PropPageExt.DLL" - -EXPORTS - DllCanUnloadNow PRIVATE - DllGetClassObject PRIVATE - DllRegisterServer PRIVATE - DllUnregisterServer PRIVATE diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/PropPageExt.vcxproj b/audio/sysvad/SwapAPO/PropPageExtensions/PropPageExt.vcxproj deleted file mode 100644 index 836e70cd..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/PropPageExt.vcxproj +++ /dev/null @@ -1,275 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{D253C552-154D-49E1-820A-B2CD9D9FF13E}</ProjectGuid> - <RootNamespace>$(MSBuildProjectName)</RootNamespace> - <SupportsPackaging>false</SupportsPackaging> - <RequiresPackageProject>true</RequiresPackageProject> - <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> - <SampleGuid>{025DDC98-E8D3-43AF-862D-3FDA9A8432E9}</SampleGuid> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> - <DriverType /> - <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> - <ConfigurationType>DynamicLibrary</ConfigurationType> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> - <DriverType /> - <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> - <ConfigurationType>DynamicLibrary</ConfigurationType> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> - <DriverType /> - <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> - <ConfigurationType>DynamicLibrary</ConfigurationType> - </PropertyGroup> - <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <TargetVersion>Windows10</TargetVersion> - <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> - <DriverType /> - <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset> - <ConfigurationType>DynamicLibrary</ConfigurationType> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <PropertyGroup> - <OutDir>$(IntDir)</OutDir> - </PropertyGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" /> - </ImportGroup> - <ItemGroup Label="WrappedTaskItems" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <TargetName>PropPageExt</TargetName> - <UseOfAtl>Dynamic</UseOfAtl> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <TargetName>PropPageExt</TargetName> - <UseOfAtl>Dynamic</UseOfAtl> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <TargetName>PropPageExt</TargetName> - <UseOfAtl>Dynamic</UseOfAtl> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <TargetName>PropPageExt</TargetName> - <UseOfAtl>Dynamic</UseOfAtl> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <ExceptionHandling>Sync</ExceptionHandling> - </ClCompile> - <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <ExceptionHandling>Sync</ExceptionHandling> - </ClCompile> - <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <ExceptionHandling>Sync</ExceptionHandling> - </ClCompile> - <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <ExceptionHandling>Sync</ExceptionHandling> - </ClCompile> - <Link> - <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol> - <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <TreatWarningAsError>true</TreatWarningAsError> - <WarningLevel>Level4</WarningLevel> - <AdditionalOptions>%(AdditionalOptions) /wd4127</AdditionalOptions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\Inc;$(DDK_INC_PATH)</AdditionalIncludeDirectories> - </ClCompile> - <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\Inc;$(DDK_INC_PATH)</AdditionalIncludeDirectories> - </Midl> - <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\Inc;$(DDK_INC_PATH)</AdditionalIncludeDirectories> - </ResourceCompile> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;kernel32.lib;user32.lib;ole32.lib;oleaut32.lib;uuid.lib;shlwapi.lib;comctl32.lib;rpcrt4.lib</AdditionalDependencies> - <ModuleDefinitionFile>PropPageExt.def</ModuleDefinitionFile> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <TreatWarningAsError>true</TreatWarningAsError> - <WarningLevel>Level4</WarningLevel> - <AdditionalOptions>%(AdditionalOptions) /wd4127</AdditionalOptions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\Inc;$(DDK_INC_PATH)</AdditionalIncludeDirectories> - </ClCompile> - <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\Inc;$(DDK_INC_PATH)</AdditionalIncludeDirectories> - </Midl> - <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\Inc;$(DDK_INC_PATH)</AdditionalIncludeDirectories> - </ResourceCompile> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;kernel32.lib;user32.lib;ole32.lib;oleaut32.lib;uuid.lib;shlwapi.lib;comctl32.lib;rpcrt4.lib</AdditionalDependencies> - <ModuleDefinitionFile>PropPageExt.def</ModuleDefinitionFile> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <TreatWarningAsError>true</TreatWarningAsError> - <WarningLevel>Level4</WarningLevel> - <AdditionalOptions>%(AdditionalOptions) /wd4127</AdditionalOptions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\Inc;$(DDK_INC_PATH)</AdditionalIncludeDirectories> - </ClCompile> - <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\Inc;$(DDK_INC_PATH)</AdditionalIncludeDirectories> - </Midl> - <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\Inc;$(DDK_INC_PATH)</AdditionalIncludeDirectories> - </ResourceCompile> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;kernel32.lib;user32.lib;ole32.lib;oleaut32.lib;uuid.lib;shlwapi.lib;comctl32.lib;rpcrt4.lib</AdditionalDependencies> - <ModuleDefinitionFile>PropPageExt.def</ModuleDefinitionFile> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <TreatWarningAsError>true</TreatWarningAsError> - <WarningLevel>Level4</WarningLevel> - <AdditionalOptions>%(AdditionalOptions) /wd4127</AdditionalOptions> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\Inc;$(DDK_INC_PATH)</AdditionalIncludeDirectories> - </ClCompile> - <Midl> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\Inc;$(DDK_INC_PATH)</AdditionalIncludeDirectories> - </Midl> - <ResourceCompile> - <PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\Inc;$(DDK_INC_PATH)</AdditionalIncludeDirectories> - </ResourceCompile> - <Link> - <AdditionalDependencies>%(AdditionalDependencies);advapi32.lib;kernel32.lib;user32.lib;ole32.lib;oleaut32.lib;uuid.lib;shlwapi.lib;comctl32.lib;rpcrt4.lib</AdditionalDependencies> - <ModuleDefinitionFile>PropPageExt.def</ModuleDefinitionFile> - </Link> - </ItemDefinitionGroup> - <ItemGroup> - <ClCompile Include="AdvEndpointPropPage.cpp"> - <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreCompiledHeaderFile>stdafx.h</PreCompiledHeaderFile> - <PreCompiledHeader>Use</PreCompiledHeader> - <PreCompiledHeaderOutputFile>$(IntDir)\stdafx.pch</PreCompiledHeaderOutputFile> - </ClCompile> - <ClCompile Include="CplExt.cpp"> - <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreCompiledHeaderFile>stdafx.h</PreCompiledHeaderFile> - <PreCompiledHeader>Use</PreCompiledHeader> - <PreCompiledHeaderOutputFile>$(IntDir)\stdafx.pch</PreCompiledHeaderOutputFile> - </ClCompile> - <ClCompile Include="Parts.cpp"> - <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreCompiledHeaderFile>stdafx.h</PreCompiledHeaderFile> - <PreCompiledHeader>Use</PreCompiledHeader> - <PreCompiledHeaderOutputFile>$(IntDir)\stdafx.pch</PreCompiledHeaderOutputFile> - </ClCompile> - <ClCompile Include="stdafx.cpp"> - <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreCompiledHeaderFile>stdafx.h</PreCompiledHeaderFile> - <PreCompiledHeader>Create</PreCompiledHeader> - <PreCompiledHeaderOutputFile>$(IntDir)\stdafx.pch</PreCompiledHeaderOutputFile> - </ClCompile> - <ClCompile Include="SwapPropPage.cpp"> - <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreCompiledHeaderFile>stdafx.h</PreCompiledHeaderFile> - <PreCompiledHeader>Use</PreCompiledHeader> - <PreCompiledHeaderOutputFile>$(IntDir)\stdafx.pch</PreCompiledHeaderOutputFile> - </ClCompile> - <ClCompile Include="TopologyExaminers.cpp"> - <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreCompiledHeaderFile>stdafx.h</PreCompiledHeaderFile> - <PreCompiledHeader>Use</PreCompiledHeader> - <PreCompiledHeaderOutputFile>$(IntDir)\stdafx.pch</PreCompiledHeaderOutputFile> - </ClCompile> - <ClCompile Include="UIWidgets.cpp"> - <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreCompiledHeaderFile>stdafx.h</PreCompiledHeaderFile> - <PreCompiledHeader>Use</PreCompiledHeader> - <PreCompiledHeaderOutputFile>$(IntDir)\stdafx.pch</PreCompiledHeaderOutputFile> - </ClCompile> - <Midl Include="CplExt.idl" /> - <ResourceCompile Include="CplExt.rc" /> - </ItemGroup> - <ItemGroup> - <Inf Exclude="@(Inf)" Include="*.inf" /> - <FilesToPackage Include="$(TargetPath)" Condition="'$(ConfigurationType)'=='Driver' or '$(ConfigurationType)'=='DynamicLibrary'" /> - </ItemGroup> - <ItemGroup> - <None Exclude="@(None)" Include="*.txt;*.htm;*.html" /> - <None Exclude="@(None)" Include="*.ico;*.cur;*.bmp;*.dlg;*.rct;*.gif;*.jpg;*.jpeg;*.wav;*.jpe;*.tiff;*.tif;*.png;*.rc2" /> - <None Exclude="@(None)" Include="*.def;*.bat;*.hpj;*.asmx" /> - </ItemGroup> - <ItemGroup> - <ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" /> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> -</Project>
\ No newline at end of file diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/SwapPropPage.cpp b/audio/sysvad/SwapAPO/PropPageExtensions/SwapPropPage.cpp deleted file mode 100644 index cdc2b0e2..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/SwapPropPage.cpp +++ /dev/null @@ -1,1154 +0,0 @@ -//**@@@*@@@**************************************************** -// -// Microsoft Windows -// Copyright (C) Microsoft Corporation. All rights reserved. -// -//**@@@*@@@**************************************************** - -// -// FileName: SwapPropPage.cpp -// -// Abstract: Implementation of the CSwapPropPage class -// -// ---------------------------------------------------------------------------- - - -#include "stdafx.h" -#include <initguid.h> // DEFINE_GUID -#include <mmdeviceapi.h> -#include <audioenginebaseapo.h> -#include <audioendpoints.h> -#include "SwapPropPage.h" -#include <functiondiscoverykeys.h> -#include <CustomPropKeys.h> -#include "cplext_i.c" - -_Analysis_mode_(_Analysis_code_type_user_driver_) - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::CSwapPropPage -// -// Description: -// CSwapPropPage constructor -// ---------------------------------------------------------------------------- -CSwapPropPage::CSwapPropPage() -: m_pAudioFXExtParams(NULL) -, m_fDisableSysFX(FALSE) -, m_fEnableSwapSFX(FALSE) -, m_fEnableSwapMFX(FALSE) -, m_fEnableDelaySFX(FALSE) -, m_fEnableDelayMFX(FALSE) -, m_fReset(FALSE) -{ -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::~CSwapPropPage -// -// Description: -// CSwapPropPage destructor -// ---------------------------------------------------------------------------- -CSwapPropPage::~CSwapPropPage() -{ - SAFE_RELEASE(m_pAudioFXExtParams->pFxProperties); - SAFE_DELETE(m_pAudioFXExtParams); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::GetDeviceFriendlyName -// -// Description: -// Retrieves the endpoint's friendly name -// -// Parameters: -// ppNameOut - [out] The friendly name of the endpoint -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -HRESULT CSwapPropPage::GetDeviceFriendlyName -( - _Outptr_result_maybenull_ LPWSTR* ppNameOut -) -{ - CComPtr<IMMDeviceEnumerator> spEnumerator; - CComPtr<IPropertyStore> spProperties; - CComPtr<IMMDevice> spMMDevice; - HRESULT hr = S_OK; - PROPVARIANT var; - - IF_TRUE_ACTION_JUMP((ppNameOut == NULL), hr = E_POINTER, Exit); - - *ppNameOut = NULL; - - // Create device enumerator and get IMMDevice from the device ID - hr = spEnumerator.CoCreateInstance(__uuidof(MMDeviceEnumerator)); - IF_FAILED_JUMP(hr, Exit); - - hr = spEnumerator->GetDevice(m_pAudioFXExtParams->pwstrEndpointID, &spMMDevice); - IF_FAILED_JUMP(hr, Exit); - - // Open the PropertyStore for read access - hr = spMMDevice->OpenPropertyStore(STGM_READ, &spProperties); - IF_FAILED_JUMP(hr, Exit); - - PropVariantInit(&var); - - // Retrieve the friendly name of the endpoint - hr = spProperties->GetValue(PKEY_Device_FriendlyName, &var); - if (SUCCEEDED(hr) && (var.vt == VT_LPWSTR)) - { - *ppNameOut = var.pwszVal; - } - else - { - PropVariantClear(&var); - } - -Exit: - return(hr); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::RetrieveSysFXState -// -// Description: -// Get the current state (enabled or disabled) of system effects -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -HRESULT CSwapPropPage::RetrieveSysFXState(BOOL *pfDisabled) -{ - HRESULT hr = E_POINTER; - - if ((m_pAudioFXExtParams != NULL) && (m_pAudioFXExtParams->pFxProperties != NULL)) - { - PROPVARIANT var; - PropVariantInit(&var); - - // Get the state of whether system effects are enabled or not - hr = m_pAudioFXExtParams->pFxProperties->GetValue(PKEY_AudioEndpoint_Disable_SysFx, &var); - if (SUCCEEDED(hr) && (var.vt == VT_UI4)) - { - *pfDisabled = (var.ulVal != 0L); - } - - PropVariantClear(&var); - } - - return(hr); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::SetSysFXState -// -// Description: -// Enable or disable system effects -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -HRESULT CSwapPropPage::SetSysFXState() -{ - BOOL fCurrentState = 0; - HRESULT hr = RetrieveSysFXState(&fCurrentState); - IF_FAILED_JUMP(hr, Exit); - - if (fCurrentState != m_fDisableSysFX) - { - PROPVARIANT var; - var.vt = VT_UI4; - var.ulVal = (m_fDisableSysFX ? 1L : 0L); - - // Enable or disable SysFX - hr = m_pAudioFXExtParams->pFxProperties->SetValue(PKEY_AudioEndpoint_Disable_SysFx, var); - } - -Exit: - return(hr); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::RetrieveSwapSFXState -// -// Description: -// Get the current state (enabled or disabled) of channel swap SFX -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -HRESULT CSwapPropPage::RetrieveSwapSFXState(BOOL *pfEnabled) -{ - HRESULT hr = E_POINTER; - - if ((m_pAudioFXExtParams != NULL) && (m_pAudioFXExtParams->pFxProperties != NULL)) - { - PROPVARIANT var; - PropVariantInit(&var); - - // Get the state of whether channel swap SFX is enabled or not - hr = m_pAudioFXExtParams->pFxProperties->GetValue(PKEY_Endpoint_Enable_Channel_Swap_SFX, &var); - if (SUCCEEDED(hr) && (var.vt == VT_UI4)) - { - *pfEnabled = (var.ulVal != 0L); - } - - PropVariantClear(&var); - } - - return(hr); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::SetSwapSFXState -// -// Description: -// Enable or disable channel swap SFX -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -HRESULT CSwapPropPage::SetSwapSFXState() -{ - BOOL fCurrentState = 0; - HRESULT hr = RetrieveSwapSFXState(&fCurrentState); - IF_FAILED_JUMP(hr, Exit); - - if (fCurrentState != m_fEnableSwapSFX) - { - PROPVARIANT var; - var.vt = VT_UI4; - var.ulVal = (m_fEnableSwapSFX ? 1L : 0L); - - // Enable or disable channel swap SFX - hr = m_pAudioFXExtParams->pFxProperties->SetValue(PKEY_Endpoint_Enable_Channel_Swap_SFX, var); - - // Enabling or disabling the swap effect can be done with the engine running - // It does not invalidate anything which should be locked by IAudioProcessingObjectConfiguration::LockForProcess - // In particular, it does not impact IAudioProcessingObject::GetLatency - // So we do not need to call IAudioEndpointFormatControl::ResetToDefault here - } - -Exit: - return(hr); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::RetrieveSwapMFXState -// -// Description: -// Get the current state (enabled or disabled) of channel swap MFX -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -HRESULT CSwapPropPage::RetrieveSwapMFXState(BOOL *pfEnabled) -{ - HRESULT hr = E_POINTER; - - if ((m_pAudioFXExtParams != NULL) && (m_pAudioFXExtParams->pFxProperties != NULL)) - { - PROPVARIANT var; - PropVariantInit(&var); - - // Get the state of whether channel swap MFX is enabled or not - hr = m_pAudioFXExtParams->pFxProperties->GetValue(PKEY_Endpoint_Enable_Channel_Swap_MFX, &var); - if (SUCCEEDED(hr) && (var.vt == VT_UI4)) - { - *pfEnabled = (var.ulVal != 0L); - } - - PropVariantClear(&var); - } - - return(hr); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::SetSwapMFXState -// -// Description: -// Enable or disable channel swap MFX -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -HRESULT CSwapPropPage::SetSwapMFXState() -{ - BOOL fCurrentState = 0; - HRESULT hr = RetrieveSwapMFXState(&fCurrentState); - IF_FAILED_JUMP(hr, Exit); - - if (fCurrentState != m_fEnableSwapMFX) - { - PROPVARIANT var; - var.vt = VT_UI4; - var.ulVal = (m_fEnableSwapMFX ? 1L : 0L); - - // Enable or disable channel swap MFX - hr = m_pAudioFXExtParams->pFxProperties->SetValue(PKEY_Endpoint_Enable_Channel_Swap_MFX, var); - - // Enabling or disabling the swap effect can be done with the engine running - // It does not invalidate anything which should be locked by IAudioProcessingObjectConfiguration::LockForProcess - // In particular, it does not impact IAudioProcessingObject::GetLatency - // So we do not need to call IAudioEndpointFormatControl::ResetToDefault here - } - -Exit: - return(hr); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::RetrieveDelaySFXState -// -// Description: -// Get the current state (enabled or disabled) of delay SFX -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -HRESULT CSwapPropPage::RetrieveDelaySFXState(BOOL *pfEnabled) -{ - HRESULT hr = E_POINTER; - - if ((m_pAudioFXExtParams != NULL) && (m_pAudioFXExtParams->pFxProperties != NULL)) - { - PROPVARIANT var; - PropVariantInit(&var); - - // Get the state of whether channel swap SFX is enabled or not - hr = m_pAudioFXExtParams->pFxProperties->GetValue(PKEY_Endpoint_Enable_Delay_SFX, &var); - if (SUCCEEDED(hr) && (var.vt == VT_UI4)) - { - *pfEnabled = (var.ulVal != 0L); - } - - PropVariantClear(&var); - } - - return(hr); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::SetSwapSFXState -// -// Description: -// Enable or disable channel swap SFX -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -HRESULT CSwapPropPage::SetDelaySFXState() -{ - BOOL fCurrentState = 0; - HRESULT hr = RetrieveDelaySFXState(&fCurrentState); - IF_FAILED_JUMP(hr, Exit); - - if (fCurrentState != m_fEnableDelaySFX) - { - PROPVARIANT var; - var.vt = VT_UI4; - var.ulVal = (m_fEnableDelaySFX ? 1L : 0L); - - // Enable or disable delay SFX - hr = m_pAudioFXExtParams->pFxProperties->SetValue(PKEY_Endpoint_Enable_Delay_SFX, var); - IF_FAILED_JUMP(hr, Exit); - - // Enabling or disabling delay changes the value that should be returned by IAudioProcessingObject::GetLatency - // This is one of the things that is locked by IAudioProcessingObjectConfiguration::LockForProcess - // So we need to call IAudioEndpointFormatControl::ResetToDefault - // This will prompt AudioDG to tear down the graph and build it up again - m_fReset = TRUE; - } - -Exit: - return(hr); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::RetrieveDelayMFXState -// -// Description: -// Get the current state (enabled or disabled) of delay MFX -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -HRESULT CSwapPropPage::RetrieveDelayMFXState(BOOL *pfEnabled) -{ - HRESULT hr = E_POINTER; - - if ((m_pAudioFXExtParams != NULL) && (m_pAudioFXExtParams->pFxProperties != NULL)) - { - PROPVARIANT var; - PropVariantInit(&var); - - // Get the state of whether channel swap MFX is enabled or not - hr = m_pAudioFXExtParams->pFxProperties->GetValue(PKEY_Endpoint_Enable_Delay_MFX, &var); - if (SUCCEEDED(hr) && (var.vt == VT_UI4)) - { - *pfEnabled = (var.ulVal != 0L); - } - - PropVariantClear(&var); - } - - return(hr); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::SetDelayMFXState -// -// Description: -// Enable or disable delay MFX -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -HRESULT CSwapPropPage::SetDelayMFXState() -{ - BOOL fCurrentState = 0; - HRESULT hr = RetrieveDelayMFXState(&fCurrentState); - IF_FAILED_JUMP(hr, Exit); - - if (fCurrentState != m_fEnableDelayMFX) - { - PROPVARIANT var; - var.vt = VT_UI4; - var.ulVal = (m_fEnableDelayMFX ? 1L : 0L); - - // Enable or disable delay MFX - hr = m_pAudioFXExtParams->pFxProperties->SetValue(PKEY_Endpoint_Enable_Delay_MFX, var); - IF_FAILED_JUMP(hr, Exit); - - // Enabling or disabling delay changes the value that should be returned by IAudioProcessingObject::GetLatency - // This is one of the things that is locked by IAudioProcessingObjectConfiguration::LockForProcess - // So we need to call IAudioEndpointFormatControl::ResetToDefault - // This will prompt AudioDG to tear down the graph and build it up again - m_fReset = TRUE; - } - -Exit: - return(hr); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::OnInitDialog -// -// Description: -// Dialog initialization routine -// -// Parameters: -// hwndDlg - [in] Handle to dialog box -// wParam - [in] Handle to control to receive the default keyboard focus -// lParam - [in] Specifies additional message-specific information -// -// Return values: -// TRUE to direct the system to set the keyboard focus to the control -// specified by wParam. Otherwise, it should return FALSE to prevent the -// system from setting the default keyboard focus. -// ---------------------------------------------------------------------------- -BOOL CSwapPropPage::OnInitDialog -( - HWND hwndDlg, - WPARAM wParam, - LPARAM lParam -) -{ - UNREFERENCED_PARAMETER(wParam); - UNREFERENCED_PARAMETER(lParam); - - HRESULT hr = S_OK; - LPWSTR pwstrEndpointName = NULL; - - // Retrieve the endpoint's friendly name, system effects, and swap SFX and MFX states - hr = GetDeviceFriendlyName(&pwstrEndpointName); - IF_FAILED_JUMP(hr, Exit); - - hr = RetrieveSysFXState(&m_fDisableSysFX); - IF_FAILED_JUMP(hr, Exit); - - hr = RetrieveSwapSFXState(&m_fEnableSwapSFX); - IF_FAILED_JUMP(hr, Exit); - - hr = RetrieveSwapMFXState(&m_fEnableSwapMFX); - IF_FAILED_JUMP(hr, Exit); - - hr = RetrieveDelaySFXState(&m_fEnableDelaySFX); - IF_FAILED_JUMP(hr, Exit); - - hr = RetrieveDelayMFXState(&m_fEnableDelayMFX); - IF_FAILED_JUMP(hr, Exit); - - // Update the property page with retrieved information - SetWindowText(GetDlgItem(hwndDlg, IDC_SPP_ENDPOINT_NAME), pwstrEndpointName); - - // Based on the retrieved states, toggle the checkboxes to reflect them - if (m_fDisableSysFX) - { - CheckDlgButton(hwndDlg, IDC_DISABLE_SYSFX, BST_CHECKED); - - // Disable APO toggling controls on the page - EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLE_SWAP_SFX), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLE_SWAP_MFX), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLE_DELAY_SFX), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLE_DELAY_MFX), FALSE); - } - else - { - CheckDlgButton(hwndDlg, IDC_DISABLE_SYSFX, BST_UNCHECKED); - - // Enable APO toggling controls on the page - EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLE_SWAP_SFX), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLE_SWAP_MFX), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLE_DELAY_SFX), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLE_DELAY_MFX), TRUE); - } - - if (m_fEnableSwapSFX) - { - CheckDlgButton(hwndDlg, IDC_ENABLE_SWAP_SFX, BST_CHECKED); - } - else - { - CheckDlgButton(hwndDlg, IDC_ENABLE_SWAP_SFX, BST_UNCHECKED); - } - - if (m_fEnableSwapMFX) - { - CheckDlgButton(hwndDlg, IDC_ENABLE_SWAP_MFX, BST_CHECKED); - } - else - { - CheckDlgButton(hwndDlg, IDC_ENABLE_SWAP_MFX, BST_UNCHECKED); - } - - if (m_fEnableDelaySFX) - { - CheckDlgButton(hwndDlg, IDC_ENABLE_DELAY_SFX, BST_CHECKED); - } - else - { - CheckDlgButton(hwndDlg, IDC_ENABLE_DELAY_SFX, BST_UNCHECKED); - } - - if (m_fEnableDelayMFX) - { - CheckDlgButton(hwndDlg, IDC_ENABLE_DELAY_MFX, BST_CHECKED); - } - else - { - CheckDlgButton(hwndDlg, IDC_ENABLE_DELAY_MFX, BST_UNCHECKED); - } - -Exit: - SAFE_COTASKMEMFREE(pwstrEndpointName); - return(FALSE); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::OnApply -// -// Description: -// Handle the pressing of the apply button -// -// Parameters: -// hwndDlg - [in] Handle to the dialog box -// -// Return values: -// TRUE to set keyboard focus on control -// ---------------------------------------------------------------------------- -BOOL CSwapPropPage::OnApply -( - HWND hwndDlg -) -{ - HRESULT hr = S_OK; - - // Commit the settings - hr = SetSysFXState(); - IF_FAILED_JUMP(hr, Exit); - - hr = SetSwapSFXState(); - IF_FAILED_JUMP(hr, Exit); - - hr = SetSwapMFXState(); - IF_FAILED_JUMP(hr, Exit); - - hr = SetDelaySFXState(); - IF_FAILED_JUMP(hr, Exit); - - hr = SetDelayMFXState(); - IF_FAILED_JUMP(hr, Exit); - - if (NULL != m_pAudioFXExtParams && NULL != m_pAudioFXExtParams->pFxProperties) - { - hr = m_pAudioFXExtParams->pFxProperties->Commit(); - IF_FAILED_JUMP(hr, Exit); - - if (m_fReset) - { - // something changed that forces us to reset the format support - CComPtr<IMMDeviceEnumerator> spEnumerator; - CComPtr<IMMDevice> spMMDevice; - - // Create device enumerator and get IMMDevice from the device ID - hr = spEnumerator.CoCreateInstance(__uuidof(MMDeviceEnumerator)); - IF_FAILED_JUMP(hr, Exit); - - hr = spEnumerator->GetDevice(m_pAudioFXExtParams->pwstrEndpointID, &spMMDevice); - IF_FAILED_JUMP(hr, Exit); - - CComPtr<IAudioEndpointFormatControl> spEndpointFormat; - hr = spMMDevice->Activate(__uuidof(IAudioEndpointFormatControl), CLSCTX_ALL, NULL, (void **)&spEndpointFormat); - IF_FAILED_JUMP(hr, Exit); - - spEndpointFormat->ResetToDefault(ENDPOINT_FORMAT_RESET_MIX_ONLY); - m_fReset = FALSE; - } - } - -Exit: - if (SUCCEEDED(hr)) - { - SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR); - } - else - { - SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_INVALID); - } - - return(TRUE); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::OnCheckBoxClickedDisableSysFX -// -// Description: -// Handle the clicking of the Disable System Effects check box -// -// Parameters: -// hwndDlg - [in] Handle to the dialog box -// -// Return values: -// FALSE to not set default keyboard focus -// ---------------------------------------------------------------------------- -BOOL CSwapPropPage::OnCheckBoxClickedDisableSysFX -( - HWND hwndDlg -) -{ - // Check the state of the check box and update associated data member - if (BST_CHECKED == IsDlgButtonChecked(hwndDlg, IDC_DISABLE_SYSFX)) - { - m_fDisableSysFX = TRUE; - - // Disable APO toggling controls on the page - EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLE_SWAP_SFX), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLE_SWAP_MFX), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLE_DELAY_SFX), FALSE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLE_DELAY_MFX), FALSE); - } - else - { - m_fDisableSysFX = FALSE; - - // Enable APO toggling controls on the page - EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLE_SWAP_SFX), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLE_SWAP_MFX), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLE_DELAY_SFX), TRUE); - EnableWindow(GetDlgItem(hwndDlg, IDC_ENABLE_DELAY_MFX), TRUE); - } - - // If the user changes the check box, enable the Apply button - SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); - - return(FALSE); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::OnCheckBoxClickedEnableSwapSFX -// -// Description: -// Handle the clicking of the Enable Channel Swap SFX check box -// -// Parameters: -// hwndDlg - [in] Handle to the dialog box -// -// Return values: -// FALSE to not set default keyboard focus -// ---------------------------------------------------------------------------- -BOOL CSwapPropPage::OnCheckBoxClickedEnableSwapSFX -( - HWND hwndDlg -) -{ - // Check the state of the check box and update associated data member - if (BST_CHECKED == IsDlgButtonChecked(hwndDlg, IDC_ENABLE_SWAP_SFX)) - { - m_fEnableSwapSFX = TRUE; - } - else - { - m_fEnableSwapSFX = FALSE; - } - - // If the user changes the check box, enable the Apply button - SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); - - return(FALSE); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::OnCheckBoxClickedEnableSwapMFX -// -// Description: -// Handle the clicking of the Enable Channel Swap MFX check box -// -// Parameters: -// hwndDlg - [in] Handle to the dialog box -// -// Return values: -// FALSE to not set default keyboard focus -// ---------------------------------------------------------------------------- -BOOL CSwapPropPage::OnCheckBoxClickedEnableSwapMFX -( - HWND hwndDlg -) -{ - // Check the state of the check box and update associated data member - if (BST_CHECKED == IsDlgButtonChecked(hwndDlg, IDC_ENABLE_SWAP_MFX)) - { - m_fEnableSwapMFX = TRUE; - } - else - { - m_fEnableSwapMFX = FALSE; - } - - // If the user changes the check box, enable the Apply button - SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); - - return(FALSE); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::OnCheckBoxClickedEnableDelaySFX -// -// Description: -// Handle the clicking of the Enable Delay SFX check box -// -// Parameters: -// hwndDlg - [in] Handle to the dialog box -// -// Return values: -// FALSE to not set default keyboard focus -// ---------------------------------------------------------------------------- -BOOL CSwapPropPage::OnCheckBoxClickedEnableDelaySFX -( - HWND hwndDlg -) -{ - // Check the state of the check box and update associated data member - if (BST_CHECKED == IsDlgButtonChecked(hwndDlg, IDC_ENABLE_DELAY_SFX)) - { - m_fEnableDelaySFX = TRUE; - } - else - { - m_fEnableDelaySFX = FALSE; - } - - // If the user changes the check box, enable the Apply button - SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); - - return(FALSE); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::OnCheckBoxClickedEnableDelayMFX -// -// Description: -// Handle the clicking of the Enable Delay MFX check box -// -// Parameters: -// hwndDlg - [in] Handle to the dialog box -// -// Return values: -// FALSE to not set default keyboard focus -// ---------------------------------------------------------------------------- -BOOL CSwapPropPage::OnCheckBoxClickedEnableDelayMFX -( - HWND hwndDlg -) -{ - // Check the state of the check box and update associated data member - if (BST_CHECKED == IsDlgButtonChecked(hwndDlg, IDC_ENABLE_DELAY_MFX)) - { - m_fEnableDelayMFX = TRUE; - } - else - { - m_fEnableDelayMFX = FALSE; - } - - // If the user changes the check box, enable the Apply button - SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0); - - return(FALSE); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::DialogProcPage1 -// -// Description: -// Callback for property page -// -// Parameters: -// hwndDlg - [in] Handle to the dialog box -// uMsg - [in] Specifies the message -// wParam - [in] Specifies additional message-specific information -// lParam - [in] Specifies additional message-specific information -// -// Return values: -// TRUE if it processed the message, FALSE if not -// ---------------------------------------------------------------------------- -INT_PTR CALLBACK CSwapPropPage::DialogProcPage1 -( - HWND hwndDlg, - UINT uMsg, - WPARAM wParam, - LPARAM lParam -) -{ - CSwapPropPage* pthis = (CSwapPropPage*)(LONG_PTR)GetWindowLongPtr( - hwndDlg, GWLP_USERDATA); - BOOL fRet = FALSE; - - switch (uMsg) - { - case WM_INITDIALOG: - { - // Extract the context data from PROPSHEETPAGE::lParam - PROPSHEETPAGE* pSheetDesc = (PROPSHEETPAGE*)lParam; - - // Create the property page factory class -#pragma warning(push) -#pragma warning(disable: 28197) - pthis = new CComObject<CSwapPropPage>(); -#pragma warning(pop) - if (pthis == NULL) - { - return(FALSE); - } - - // Save this object in lParam - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)pthis); - - // Keep audio FX extension parameters passed by the control panel - pthis->m_pAudioFXExtParams = (AudioFXExtensionParams*)pSheetDesc->lParam; - - fRet = pthis->OnInitDialog(hwndDlg, wParam, lParam); - break; - } - - case WM_NOTIFY: - { - switch (((NMHDR FAR*)lParam)->code) - { - case PSN_APPLY: - if (pthis) - { - // Apply button pressed - fRet = pthis->OnApply(hwndDlg); - } - break; - } - break; - } - - case WM_COMMAND: - { - switch (LOWORD(wParam)) - { - // Handle the clicking of the check boxes - case IDC_DISABLE_SYSFX: - if (pthis) - { - fRet = pthis->OnCheckBoxClickedDisableSysFX(hwndDlg); - } - break; - - case IDC_ENABLE_SWAP_SFX: - if (pthis) - { - fRet = pthis->OnCheckBoxClickedEnableSwapSFX(hwndDlg); - } - break; - - case IDC_ENABLE_SWAP_MFX: - if (pthis) - { - fRet = pthis->OnCheckBoxClickedEnableSwapMFX(hwndDlg); - } - break; - - case IDC_ENABLE_DELAY_SFX: - if (pthis) - { - fRet = pthis->OnCheckBoxClickedEnableDelaySFX(hwndDlg); - } - break; - - case IDC_ENABLE_DELAY_MFX: - if (pthis) - { - fRet = pthis->OnCheckBoxClickedEnableDelayMFX(hwndDlg); - } - break; - } - break; - } - - case WM_DESTROY: - { - SAFE_DELETE(pthis); - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, NULL); - fRet = TRUE; - break; - } - } - - return(fRet); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::PropSheetPageProc -// -// Description: -// Callback that gets invoked right after page creation or right before -// before page destruction -// -// Parameters: -// hwnd - Reserved; must be NULL -// uMsg - [in] Action flag. PSPCB_ADDREF, PSPCB_CREATE, or PSPCB_RELEASE -// ppsp - [in, out] Pointer to a PROPSHEETPAGE structure that defines -// the page being created or destroyed. -// -// Return values: -// Depends on the value of the uMsg parameter -// ---------------------------------------------------------------------------- -UINT CALLBACK CSwapPropPage::PropSheetPageProc -( - HWND hwnd, - UINT uMsg, - LPPROPSHEETPAGE ppsp -) -{ - UNREFERENCED_PARAMETER(hwnd); - UNREFERENCED_PARAMETER(uMsg); - UNREFERENCED_PARAMETER(ppsp); - - // if (uMsg == PSPCB_CREATE) ... - return(1); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::Initialize -// -// Description: -// Implementation of IShellExtInit::Initialize. Initializes a property -// sheet extension, shortcut menu extension, or drag-and-drop handler. -// -// Parameters: -// pidlFolder - [in] Address of an ITEMIDLIST structure that uniquely -// identifies a folder. For property sheet extensions, -// this parameter is NULL. -// pdtobj - [out] Address of an IDataObject interface object that can be -// used to retrieve the objects being acted upon. -// hkeyProgID - [in] Registry key for the file object or folder type. -// -// Return values: -// Returns NOERROR if successful, or an OLE-defined error value otherwise -// ---------------------------------------------------------------------------- -_Use_decl_annotations_ -HRESULT CSwapPropPage::Initialize -( - LPCITEMIDLIST pidlFolder, - IDataObject* pdtobj, - HKEY hkeyProgID -) -{ - UNREFERENCED_PARAMETER(pidlFolder); - UNREFERENCED_PARAMETER(pdtobj); - UNREFERENCED_PARAMETER(hkeyProgID); - - return(S_OK); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::AddPages -// -// Description: -// Implementation of IShellPropSheetExt::AddPages. Adds one or more pages -// to a property sheet that the Shell displays for a file object. -// -// Parameters: -// lpfnAddPage - [in] Address of a function that the property sheet -// handler calls to add a page to the property sheet. The -// function takes a property sheet handle returned by the -// CreatePropertySheetPage function and the lParam parameter -// passed to the AddPages method. -// lParam - [in] Parameter to pass to the function specified by the -// lpfnAddPage method. -// -// Return values: -// Returns S_OK if successful. If the method fails, an OLE-defined error -// code is returned -// ---------------------------------------------------------------------------- -_Use_decl_annotations_ -HRESULT STDMETHODCALLTYPE CSwapPropPage::AddPages -( - LPFNADDPROPSHEETPAGE lpfnAddPage, // See PrSht.h - LPARAM lParam // Used by caller, don't modify -) -{ - HRESULT hr = S_OK; - PROPSHEETPAGE psp; - HPROPSHEETPAGE hPage1 = NULL; - AudioFXExtensionParams* pAudioFXParams = (AudioFXExtensionParams*)lParam; -#pragma warning(push) -#pragma warning(disable: 28197) - AudioFXExtensionParams* pAudioFXParamsCopy = new AudioFXExtensionParams; -#pragma warning(pop) - - if (pAudioFXParamsCopy == NULL) - { - return E_OUTOFMEMORY; - } - - // Make a copy of the params - CopyMemory(pAudioFXParamsCopy, pAudioFXParams, sizeof(AudioFXExtensionParams)); - SAFE_ADDREF(pAudioFXParamsCopy->pFxProperties); - - // Initialize property page params and create page - psp.dwSize = sizeof(psp); - psp.dwFlags = PSP_USEREFPARENT | PSP_USECALLBACK; - psp.hInstance = _AtlBaseModule.GetModuleInstance(); - psp.hIcon = 0; - psp.pcRefParent = (UINT*)&m_dwRef; - psp.lParam = (LPARAM)pAudioFXParamsCopy; - psp.pszTemplate = MAKEINTRESOURCE(IDD_SWAP_PROP_PAGE); - psp.pfnDlgProc = (DLGPROC)DialogProcPage1; - psp.pfnCallback = PropSheetPageProc; - - // Create the property sheet page and add the page - hPage1 = CreatePropertySheetPage(&psp); - if (hPage1) - { - if (!lpfnAddPage(hPage1, pAudioFXParams->AddPageParam)) - { - hr = E_FAIL; - delete pAudioFXParamsCopy; - DestroyPropertySheetPage(hPage1); - } - else - { - // Add ref for page - this->AddRef(); - } - } - else - { - delete pAudioFXParamsCopy; - hr = E_OUTOFMEMORY; - } - - return(hr); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CSwapPropPage::ReplacePage -// -// Description: -// Implementation of IShellPropSheetExt::ReplacePage. Replaces a page in -// a property sheet for a Control Panel object. -// -// Parameters: -// uPageID - [in] Identifier of the page to replace -// lpfnReplacePage - [in] Address of a function that the property sheet -// handler calls to replace a page to the property -// sheet. The function takes a property sheet handle -// returned by the CreatePropertySheetPage function and -// the lParam parameter passed to the ReplacePage -// method. -// lParam - [in] Parameter to pass to the function specified by the -// lpfnReplacePage parameter. -// -// Return values: -// Returns NOERROR if successful, or an OLE-defined error value otherwise -// ---------------------------------------------------------------------------- -_Use_decl_annotations_ -HRESULT STDMETHODCALLTYPE CSwapPropPage::ReplacePage -( - UINT uPageID, - LPFNSVADDPROPSHEETPAGE lpfnReplaceWith, - LPARAM lParam -) -{ - UNREFERENCED_PARAMETER(uPageID); - UNREFERENCED_PARAMETER(lpfnReplaceWith); - UNREFERENCED_PARAMETER(lParam); - - return(S_FALSE); -} diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/SwapPropPage.h b/audio/sysvad/SwapAPO/PropPageExtensions/SwapPropPage.h deleted file mode 100644 index 295e29bc..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/SwapPropPage.h +++ /dev/null @@ -1,92 +0,0 @@ -//**@@@*@@@**************************************************** -// -// Microsoft Windows -// Copyright (C) Microsoft Corporation. All rights reserved. -// -//**@@@*@@@**************************************************** - -// -// FileName: SwapPropPage.h -// -// Abstract: Declaration of the CSwapPropPage class -// -// ---------------------------------------------------------------------------- - - -#pragma once - -// ---------------------------------------------------------------------- -// CSwapPropPage class -// -class ATL_NO_VTABLE CSwapPropPage : - public CComObjectRootEx<CComSingleThreadModel>, - public CComCoClass<CSwapPropPage, &CLSID_SwapPropPage>, - public IDispatchImpl<ISwapPropPage, &__uuidof(ISwapPropPage), &LIBID_CplExtLib, /*wMajor =*/ 1, /*wMinor =*/ 0>, - public IShellExtInit, - public IShellPropSheetExt -{ -public: - CSwapPropPage(); - ~CSwapPropPage(); - - DECLARE_REGISTRY_RESOURCEID(IDR_SWAP_PROP_PAGE) - - BEGIN_COM_MAP(CSwapPropPage) - COM_INTERFACE_ENTRY(ISwapPropPage) - COM_INTERFACE_ENTRY(IDispatch) - COM_INTERFACE_ENTRY(IShellExtInit) - COM_INTERFACE_ENTRY(IShellPropSheetExt) - END_COM_MAP() - - DECLARE_PROTECT_FINAL_CONSTRUCT() - - HRESULT FinalConstruct() - { - return S_OK; - } - - void FinalRelease() - { - } - - static INT_PTR CALLBACK DialogProcPage1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); - static UINT CALLBACK PropSheetPageProc(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp); - - // IShellExtInit - STDMETHOD(Initialize)(_In_opt_ LPCITEMIDLIST pidlFolder, _In_opt_ IDataObject* pdtobj, _In_opt_ HKEY hkeyProgID); - - // IShellPropSheetExt - STDMETHOD(AddPages)(_In_ LPFNADDPROPSHEETPAGE lpfnAddPage, _In_ LPARAM lParam); - STDMETHOD(ReplacePage)(_In_ UINT uPageID, _In_ LPFNSVADDPROPSHEETPAGE lpfnReplaceWith, _In_ LPARAM lParam); - -private: - AudioFXExtensionParams* m_pAudioFXExtParams; - BOOL m_fDisableSysFX; - BOOL m_fEnableSwapSFX; - BOOL m_fEnableSwapMFX; - BOOL m_fEnableDelaySFX; - BOOL m_fEnableDelayMFX; - BOOL m_fReset; - - HRESULT GetDeviceFriendlyName(_Outptr_result_maybenull_ LPWSTR* ppNameOut); - HRESULT RetrieveSysFXState(BOOL *pfDisabled); - HRESULT SetSysFXState(); - HRESULT RetrieveSwapSFXState(BOOL *pfEnabled); - HRESULT SetSwapSFXState(); - HRESULT RetrieveSwapMFXState(BOOL *pfEnabled); - HRESULT SetSwapMFXState(); - HRESULT RetrieveDelaySFXState(BOOL *pfEnabled); - HRESULT SetDelaySFXState(); - HRESULT RetrieveDelayMFXState(BOOL *pfEnabled); - HRESULT SetDelayMFXState(); - - BOOL OnInitDialog(HWND hwndDlg, WPARAM wParam, LPARAM lParam); - BOOL OnApply(HWND hwndDlg); - BOOL OnCheckBoxClickedDisableSysFX(HWND hwndDlg); - BOOL OnCheckBoxClickedEnableSwapSFX(HWND hwndDlg); - BOOL OnCheckBoxClickedEnableSwapMFX(HWND hwndDlg); - BOOL OnCheckBoxClickedEnableDelaySFX(HWND hwndDlg); - BOOL OnCheckBoxClickedEnableDelayMFX(HWND hwndDlg); -}; - -OBJECT_ENTRY_AUTO(__uuidof(SwapPropPage), CSwapPropPage) diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/SwapPropPage.rgs b/audio/sysvad/SwapAPO/PropPageExtensions/SwapPropPage.rgs deleted file mode 100644 index 6ede57a1..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/SwapPropPage.rgs +++ /dev/null @@ -1,27 +0,0 @@ -HKCR -{ - CplExt.SwapPropPage.1 = s 'SwapPropPage Class' - { - CLSID = s '{19166F23-5F08-47F9-BB57-9F57A977D88E}' - } - CplExt.SwapPropPage = s 'SwapPropPage Class' - { - CLSID = s '{19166F23-5F08-47F9-BB57-9F57A977D88E}' - CurVer = s 'CplExt.SwapPropPage.1' - } - NoRemove CLSID - { - ForceRemove {19166F23-5F08-47F9-BB57-9F57A977D88E} = s 'SwapPropPage Class' - { - ProgID = s 'CplExt.SwapPropPage.1' - VersionIndependentProgID = s 'CplExt.SwapPropPage' - ForceRemove 'Programmable' - InprocServer32 = s '%MODULE%' - { - val ThreadingModel = s 'Apartment' - } - val AppID = s '%APPID%' - 'TypeLib' = s '{59390583-ED40-46D9-9B16-7800B9CC5CC2}' - } - } -} diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/TopologyExaminers.cpp b/audio/sysvad/SwapAPO/PropPageExtensions/TopologyExaminers.cpp deleted file mode 100644 index b224f4c1..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/TopologyExaminers.cpp +++ /dev/null @@ -1,162 +0,0 @@ -//**@@@*@@@**************************************************** -// -// Microsoft Windows -// Copyright (C) Microsoft Corporation. All rights reserved. -// -//**@@@*@@@**************************************************** - -// -// FileName: TopologyExaminers.cpp -// -// Description: -// -// -------------------------------------------------------------------------------- - - -#include "stdafx.h" -#include "DeviceTopology.h" -#include "TopologyExaminers.h" - -_Analysis_mode_(_Analysis_code_type_user_driver_) - -// ---------------------------------------------------------------------------- -// Function: -// CFormatExaminer::CFormatExaminer -// -// Description: -// CFormatExaminer constructor -// ---------------------------------------------------------------------------- -CFormatExaminer::CFormatExaminer -( - PKSDATAFORMAT pKsFormat, - ULONG cbFormat -) -: m_bSatisfied(FALSE), - m_pFormatReq(NULL) -{ - ATLASSERT(pKsFormat); - ATLASSERT(cbFormat >= sizeof(KSDATAFORMAT)); - - // If any of this fails, then Examine will fail - if (cbFormat >= sizeof(KSDATAFORMAT)) - { - m_pFormatReq = (PKSDATAFORMAT)(new BYTE[cbFormat]); - CopyMemory(m_pFormatReq, pKsFormat, cbFormat); - if (cbFormat < m_pFormatReq->FormatSize) - m_pFormatReq->FormatSize = cbFormat; - } -} - - -// ---------------------------------------------------------------------------- -// Function: -// CFormatExaminer::~CFormatExaminer -// -// Description: -// CFormatExaminer destructor -// ---------------------------------------------------------------------------- -CFormatExaminer::~CFormatExaminer() -{ - SAFE_DELETE_ARRAY(m_pFormatReq); -} - - -// ---------------------------------------------------------------------- -// Function: -// CFormatExaminer::Examine -// -// Description: -// Implementation of IExaminer::Examine. This method checks the supplied -// path an IConnector that support the KS streaming format (KSDATAFORMAT) -// that this examiner was set up to look for. -// -// Parameters: -// pPath - [in] List of parts to examine -// -// Remarks: -// This examiner only cares about the first part in the list, which is -// always a connector or an endpoint. Therefore it only needs to make -// sure that there is a zeroth element in the list and examine that. -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------- -HRESULT CFormatExaminer::Examine -( - IPartsList* pPath -) -{ - ATLASSERT(pPath != NULL); - - HRESULT hr = S_OK; - UINT cParts; - CComPtr<IPart> spPart; - - // Make sure there is at least 1 part - hr = pPath->GetCount(&cParts); - IF_FAILED_JUMP(hr, Exit); - - IF_TRUE_ACTION_JUMP((cParts == 0), hr = E_NOTFOUND, Exit); - - // This examiner only cares about Connectors so don't bother walking the - // path, just look at the last in the list, which should be a connector. - hr = pPath->GetPart(0, &spPart); - IF_FAILED_JUMP(hr, Exit); - - hr = ExaminePart(spPart); - -Exit: - return hr; -} - - -// ---------------------------------------------------------------------- -// Function: -// CFormatExaminer::ExaminePart -// -// Description: -// Tests a single IPart against the examination criteria, namely be a -// connector that supports whatever KS Streaming format (KSDATAFORMAT) -// this examiner was set up to look for -// -// Parameters: -// pIPart - [in] Part to examine -// -// Remarks: -// 1) Make sure the connector is of type Software_IO -// 2) Activate IKsFormatSupport on the connector -// 3) Call IKsFormatSupport::IsFormatSupported(m_pFormatReq). -// -// ---------------------------------------------------------------------- -HRESULT CFormatExaminer::ExaminePart -( - IPart* pIPart -) -{ - ATLASSERT(pIPart); - - HRESULT hr = S_OK; - - // 1) Check category and make sure it is a software_IO pin - ConnectorType conType; - CComPtr<IConnector> spConnector; - CComPtr<IKsFormatSupport> spFormatSupport; - - hr = pIPart->QueryInterface(__uuidof(IConnector), (void**)&spConnector); - IF_FAILED_JUMP(hr, Exit); - - hr = spConnector->GetType(&conType); - IF_FAILED_JUMP(hr, Exit); - - IF_TRUE_ACTION_JUMP((conType != Software_IO), hr = E_NOTFOUND, Exit); - - // 2) Activate IKsFormatSupport interface - hr = pIPart->Activate(CLSCTX_INPROC_SERVER, __uuidof(IKsFormatSupport), (void**)&spFormatSupport); - IF_FAILED_JUMP(hr, Exit); - - // 3) Ask the interface if this format is supported - hr = spFormatSupport->IsFormatSupported(m_pFormatReq, m_pFormatReq->FormatSize, &m_bSatisfied); - -Exit: - return hr; -} diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/TopologyExaminers.h b/audio/sysvad/SwapAPO/PropPageExtensions/TopologyExaminers.h deleted file mode 100644 index eafd52f0..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/TopologyExaminers.h +++ /dev/null @@ -1,50 +0,0 @@ -//**@@@*@@@**************************************************** -// -// Microsoft Windows -// Copyright (C) Microsoft Corporation. All rights reserved. -// -//**@@@*@@@**************************************************** - -// -// FileName: TopologyExaminers.h -// -// Abstract: An interface and supporting class(es) for examining device -// model IParts -// -// ---------------------------------------------------------------------------- - -#pragma once - - -// ---------------------------------------------------------------------- -// interface IExaminer -// An interface for examining devicemodel IParts -// ---------------------------------------------------------------------- -interface IExaminer -{ -public: - virtual HRESULT Examine(IPartsList* pPath) = 0; - virtual BOOL IsSatisfied() = 0; -}; - - -// -------------------------------------------------------------------------------- -// class CFormatExaminer -// A class that examines IConnectors looking for a soft connector that supports -// a given KS streaming format (KSDATAFORMAT). -// ---------------------------------------------------------------------- -class CFormatExaminer : public IExaminer -{ -private: - PKSDATAFORMAT m_pFormatReq; - BOOL m_bSatisfied; - - HRESULT ExaminePart(IPart* pIPart); - -public: - CFormatExaminer(PKSDATAFORMAT pKsFormat, ULONG cbFormat); - ~CFormatExaminer(); - - HRESULT Examine(IPartsList* pPath); - BOOL IsSatisfied() { return m_bSatisfied; } -}; diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/UIWidgets.cpp b/audio/sysvad/SwapAPO/PropPageExtensions/UIWidgets.cpp deleted file mode 100644 index 9dc272af..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/UIWidgets.cpp +++ /dev/null @@ -1,321 +0,0 @@ -//**@@@*@@@**************************************************** -// -// Microsoft Windows -// Copyright (C) Microsoft Corporation. All rights reserved. -// -//**@@@*@@@**************************************************** - -// -// FileName: UIWidgets.cpp -// -// Abstract: Implementation of CUIWidget and derived classes -// -// ---------------------------------------------------------------------------- - - -#include "stdafx.h" -#include <DeviceTopology.h> -#include "UIWidgets.h" - -_Analysis_mode_(_Analysis_code_type_user_driver_) - -// ---------------------------------------------------------------------- -// CUIWidget base class - - -// ---------------------------------------------------------------------------- -// Function: -// CUIWidget::CUIWidget -// -// Description: -// CUIWidget constructor -// ---------------------------------------------------------------------------- -CUIWidget::CUIWidget -( - IPart* pPart, - REFIID iid -) -: m_hwndParentDlg(NULL), - m_iid(iid), - m_wstrLabel(NULL), - m_bRegisteredForCallbacks(NULL) -{ - // This is done here rather than in the initializer list to avoid a prefix error - if (pPart != NULL) - { - m_spPart = pPart; - } - - m_dwProcessId = GetCurrentProcessId(); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CUIWidget::~CUIWidget -// -// Description: -// CUIWidget destructor -// ---------------------------------------------------------------------------- -CUIWidget::~CUIWidget() -{ - SAFE_COTASKMEMFREE(m_wstrLabel); - - if (m_bRegisteredForCallbacks) - { - m_spPart->UnregisterControlChangeCallback(this); - } -} - - -// ---------------------------------------------------------------------------- -// Function: -// CUIWidget::Create -// -// Description: -// -- Activates the control interface on the specified part -// -- Registers for control change callbacks -// -// Parameters: -// hwndDlg - [in] Parent dialog of the widget -// rc - [in] Not used -// ctrlIdBase - [in] Not used -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -HRESULT CUIWidget::Create -( - HWND hwndDlg, - SRECT& /*rc*/, - UINT& /*ctrlIdBase*/ -) -{ - HRESULT hr; - - m_hwndParentDlg = hwndDlg; - - RPC_STATUS rpcs = UuidCreate(&m_guidEventContext); - if (rpcs != RPC_S_OK) - { - hr = HRESULT_FROM_WIN32(rpcs); - goto Exit; - } - - hr = m_spPart->Activate(CLSCTX_INPROC_SERVER, m_iid, (void**)&m_spControl); - IF_FAILED_JUMP(hr, Exit); - - hr = m_spPart->RegisterControlChangeCallback(m_iid, this); - IF_FAILED_JUMP(hr, Exit); - - m_bRegisteredForCallbacks = TRUE; - - hr = m_spPart->GetName(&m_wstrLabel); - -Exit: - return hr; -}; - - -// ---------------------------------------------------------------------- -// Function: -// CUIWidget::OnNotify -// -// Description: -// Implementation of IControlChangeNotify::OnNotify -// Called when someone calls a "Set" method on a control interface. -// -// Parameters: -// dwProcessId - [in] Process ID -// pguidEventContext - Event context guid -// -// Return: -// S_OK always -// ---------------------------------------------------------------------- -_Use_decl_annotations_ -HRESULT CUIWidget::OnNotify -( - DWORD dwProcessId, - LPCGUID pguidEventContext -) -{ - UNREFERENCED_PARAMETER(dwProcessId); - - if ((pguidEventContext == NULL) || - (*pguidEventContext != m_guidEventContext)) - { - // Delegate to derived class - HandleControlChangeNotification(); - } - - return S_OK; -} - - -// ---------------------------------------------------------------------- -// ---------------------------------------------------------------------- -// CBooleanWidget - - -// ---------------------------------------------------------------------------- -// Function: -// CBooleanWidget::CBooleanWidget -// -// Description: -// CBooleanWidget constructor -// ---------------------------------------------------------------------------- -CBooleanWidget::CBooleanWidget -( - IPart* pPart, - REFIID iid -) -: CUIWidget(pPart, iid), - m_hwndCheckbox(NULL), - m_bCurrentValue(FALSE) -{ -} - - -// ---------------------------------------------------------------------------- -// Function: -// CBooleanWidget::Create -// -// Description: -// Creates the widget which is a dialog -// -// Parameters: -// hwndDlg - [in] Parent dialog of the widget -// rc - [in] Position of the widget -// nCtrlId - [in] Child-window identifier -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -HRESULT CBooleanWidget::Create -( - HWND hwndDlg, - SRECT& rc, - UINT& nCtrlId -) -{ - HRESULT hr; - HFONT hFont; - DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_AUTOCHECKBOX; - - // Activate the control interface and register for callbacks - hr = CUIWidget::Create(hwndDlg, rc, nCtrlId); - IF_FAILED_JUMP(hr, Exit); - - // Create a check box - rc.w = 300; - rc.h = 20; - m_hwndCheckbox = CreateWindowEx( - 0, //WS_EX_STATICEDGE, - WC_BUTTON, - m_wstrLabel, - dwStyle, - rc.x, rc.y, // put at (x,y) - rc.w, rc.h, - m_hwndParentDlg, - (HMENU)(UINT_PTR)nCtrlId, - NULL, - 0); - IF_TRUE_ACTION_JUMP((m_hwndCheckbox == NULL), hr = HRESULT_FROM_WIN32(GetLastError()), Exit); - - // Make the new control use the same font as the dialog - hFont = Window_GetFont(hwndDlg); - Window_SetFont(m_hwndCheckbox, hFont); - - // Get the current value - hr = HandleControlChangeNotification(); - IF_FAILED_JUMP(hr, Exit); - -Exit: - return hr; -} - - -// ---------------------------------------------------------------------- -// Function: -// CBooleanWidget::HandleControlChangeNotification() -// -// Description: -// Handles widget change notifications -// -// Return: -// S_OK if successful -// ---------------------------------------------------------------------- -HRESULT CBooleanWidget::HandleControlChangeNotification() -{ - HRESULT hr = S_OK; - - ATLASSERT(m_spControl); - ATLASSERT(m_hwndCheckbox); - - // Set value on DeviceTopology control interface - if (m_iid == __uuidof(IAudioLoudness)) - { - CComQIPtr<IAudioLoudness> spLoudness = m_spControl; - hr = spLoudness->GetEnabled(&m_bCurrentValue); - } - else if (m_iid == __uuidof(IAudioAutoGainControl)) - { - CComQIPtr<IAudioAutoGainControl> spAGC = m_spControl; - hr = spAGC->GetEnabled(&m_bCurrentValue); - } - else if (m_iid == __uuidof(IDeviceSpecificProperty)) - { - CComQIPtr<IDeviceSpecificProperty> spBoolCtrl = m_spControl; - DWORD cbValue = sizeof(m_bCurrentValue); - - hr = spBoolCtrl->GetValue(&m_bCurrentValue, &cbValue); - } - - // Set the check box to reflect the current value - SendMessage(m_hwndCheckbox, BM_SETCHECK, (WPARAM)(int)(m_bCurrentValue), 0L); - - return hr; -} - - -// ---------------------------------------------------------------------------- -// Function: -// CBooleanWidget::CommitValue -// -// Description: -// Commit the value set on the control -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -HRESULT CBooleanWidget::CommitValue() -{ - HRESULT hr = S_OK; - - ATLASSERT(m_spControl); - ATLASSERT(m_hwndCheckbox); - - // Get current value from check box - m_bCurrentValue = ((int)(DWORD)SendMessage(m_hwndCheckbox, BM_GETCHECK, 0L, 0L)); - - // Set value on DeviceTopology control interface - if (m_iid == __uuidof(IAudioLoudness)) - { - CComQIPtr<IAudioLoudness> spLoudness = m_spControl; - hr = spLoudness->SetEnabled(m_bCurrentValue, GetEventContext()); - } - else if (m_iid == __uuidof(IAudioAutoGainControl)) - { - CComQIPtr<IAudioAutoGainControl> spAGC = m_spControl; - hr = spAGC->SetEnabled(m_bCurrentValue, GetEventContext()); - } - else if (m_iid == __uuidof(IDeviceSpecificProperty)) - { - CComQIPtr<IDeviceSpecificProperty> spBoolCtrl = m_spControl; - - hr = spBoolCtrl->SetValue(&m_bCurrentValue, sizeof(m_bCurrentValue), - GetEventContext()); - } - - return hr; -}; diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/UIWidgets.h b/audio/sysvad/SwapAPO/PropPageExtensions/UIWidgets.h deleted file mode 100644 index 1f807bd4..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/UIWidgets.h +++ /dev/null @@ -1,405 +0,0 @@ -//**@@@*@@@**************************************************** -// -// Microsoft Windows -// Copyright (C) Microsoft Corporation. All rights reserved. -// -//**@@@*@@@**************************************************** - -// -// FileName: UIWidgets.h -// -// Abstract: Declaration of CUIWidget and derived classes -// -// ---------------------------------------------------------------------------- - - -#pragma once - - -// ---------------------------------------------------------------------------- -// Class: -// CUIWidget -// -// Description: -// Base class for different types of widgets -// -// ---------------------------------------------------------------------------- -class CUIWidget : public IControlChangeNotify -{ -protected: - HWND m_hwndParentDlg; - IID m_iid; - CComPtr<IPart> m_spPart; - CComPtr<IUnknown> m_spControl; - DWORD m_dwProcessId; - LPWSTR m_wstrLabel; - BOOL m_bRegisteredForCallbacks; - GUID m_guidEventContext; - -public: - CUIWidget(IPart* pPart, REFIID iid); - virtual ~CUIWidget(); - - virtual HRESULT Create(HWND hwndDlg, SRECT& rc, UINT& nCtrlIdBase); - virtual HRESULT HandleControlChangeNotification() = 0; - virtual BOOL OwnsCtrlId(int ctrlId) - { - UNREFERENCED_PARAMETER(ctrlId); - return FALSE; - } - virtual HRESULT OnClick() { return S_OK; } - virtual HRESULT OnHScroll() { return S_OK; } - virtual LPCGUID GetEventContext() { return &m_guidEventContext; } - virtual HRESULT CommitValue() { return S_OK; } - - // IControlChangeNotify - STDMETHOD(OnNotify)(_In_ DWORD dwProcessId, _In_opt_ LPCGUID pguidEventContext); - - // IUnknown (since we implement IControlChangeNotify) - HRESULT STDMETHODCALLTYPE QueryInterface(const IID& iid, void** ppUnk) - { - UNREFERENCED_PARAMETER(iid); - - *ppUnk = NULL; - return E_NOTIMPL; - } - ULONG STDMETHODCALLTYPE AddRef(void) - { return 0; } - ULONG STDMETHODCALLTYPE Release(void) - { return 0; } -}; - - -// ---------------------------------------------------------------------------- -// Class: -// CBooleanWidget -// -// Description: -// Handles IAudioLoudness, IAudioAutoGainControl and -// IGenericBooleanProperty -// -// ---------------------------------------------------------------------------- -class CBooleanWidget : public CUIWidget -{ -protected: - BOOL m_bCurrentValue; - HWND m_hwndCheckbox; - -public: - CBooleanWidget(IPart* pPart, REFIID iid); - - HRESULT Create(HWND hwndDlg, SRECT& rc, UINT& nCtrlIdBase); // virtual - - virtual HRESULT HandleControlChangeNotification(); - virtual BOOL OwnsCtrlId(int ctrlId) - { return (ctrlId == GetDlgCtrlID(m_hwndCheckbox)); } - HRESULT CommitValue(); -}; - - -// ---------------------------------------------------------------------------- -// TODO: Underlying plumbing for the LONG and ULOG types aren't implemented -// yet in audiocore. Once that's implemented and verified working, need to -// remove #if TEST stuff -// ---------------------------------------------------------------------------- - -// ---------------------------------------------------------------------------- -// Class: -// CLongWidget -// -// Description: -// Handles IDeviceSpecificProperty -// ---------------------------------------------------------------------------- -template <class _TYPE_> -class CLongWidget : public CUIWidget -{ -public: - CLongWidget(IPart* pPart); - ~CLongWidget(); - virtual HRESULT Create(HWND hwndDlg, SRECT& rc, UINT& ctrlIdBase); - virtual HRESULT HandleControlChangeNotification(); - virtual HRESULT CommitValue(); - -private: - HWND m_hwnd; - HWND m_hwndLabel; - HWND m_hwndTrackbar; - HWND m_hwndValue; - _TYPE_ m_Value; - _TYPE_ m_Min; - _TYPE_ m_Max; - LONG m_Stepping; - CComQIPtr<IDeviceSpecificProperty> m_spDevSpecControl; - - static INT_PTR CALLBACK DlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); - void UpdateValueText(); -}; - - -// ---------------------------------------------------------------------------- -// ---------------------------------------------------------------------------- -// Implementation of CLongWidget - - -// ---------------------------------------------------------------------------- -// Function: -// CLongWidget<_TYPE_>::CLongWidget -// -// Description: -// CLongWidget<_TYPE_> constructor -// ---------------------------------------------------------------------------- -template <class _TYPE_> -CLongWidget<_TYPE_>::CLongWidget(IPart* pPart) -: CUIWidget(pPart, __uuidof(IDeviceSpecificProperty)), - m_hwndTrackbar(NULL), - m_hwndLabel(NULL), - m_Value(0), - m_Min(0), - m_Max(0), - m_Stepping(1) -{ -} - - -// ---------------------------------------------------------------------------- -// Function: -// CLongWidget<_TYPE_>::CLongWidget -// -// Description: -// CLongWidget<_TYPE_> destructor -// ---------------------------------------------------------------------------- -template <class _TYPE_> -CLongWidget<_TYPE_>::~CLongWidget() -{ - DestroyWindow(m_hwnd); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CLongWidget<_TYPE_>::Create -// -// Description: -// Creates the widget which is a dialog -// -// Parameters: -// hwndDlg - [in] Parent dialog of the widget -// rc - [in] Position of the widget -// ctrlIdBase - [in] Not used -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -template <class _TYPE_> -HRESULT CLongWidget<_TYPE_>::Create -( - HWND hwndDlg, - SRECT& rc, - UINT& ctrlIdBase -) -{ - HRESULT hr = S_OK; - HFONT hFont; - RECT rcClient; - LONG lMin, lMax; - - // Activate the control interface and register for callbacks - hr = CUIWidget::Create(hwndDlg, rc, ctrlIdBase); - IF_FAILED_JUMP(hr, Exit); - - // QI for specific interface - m_spDevSpecControl = m_spControl; - - // Create dialog - m_hwnd = CreateDialogParam( g_hInstance, - MAKEINTRESOURCE(IDD_WIDGET_GEN_LONG), - hwndDlg, - CLongWidget<_TYPE_>::DlgProc, - (LPARAM)this); - - IF_TRUE_ACTION_JUMP((m_hwnd == NULL), hr = HRESULT_FROM_WIN32(GetLastError()), Exit); - - SetWindowPos(m_hwnd, NULL, rc.x, rc.y, 0, 0, SWP_NOZORDER | SWP_NOSIZE); - GetClientRect(m_hwnd, &rcClient); - rc.w = rcClient.right - rcClient.left; - rc.h = rcClient.bottom - rcClient.top; - - // Make the new controls use the same font as the dialog - hFont = Window_GetFont(hwndDlg); - - m_hwndLabel = GetDlgItem(m_hwnd, IDC_GEN_LABEL); - m_hwndTrackbar = GetDlgItem(m_hwnd, IDC_GEN_SLIDER); - m_hwndValue = GetDlgItem(m_hwnd, IDC_GEN_VALUE); - - Window_SetFont(m_hwndValue, hFont); - Window_SetFont(m_hwndLabel, hFont); - SetWindowText(m_hwndLabel, m_wstrLabel); - - // Set value text - hr = m_spDevSpecControl->Get4BRange(&lMin, &lMax, &m_Stepping); - IF_FAILED_JUMP(hr, Exit); - - m_Min = (_TYPE_)lMin; - m_Max = (_TYPE_)lMax; - - // Set trackbar range and ticks - TrackBar_SetRange(m_hwndTrackbar, 0, 100); - TrackBar_SetTickFrequency(m_hwndTrackbar, 20); // 5 ticks - - // Set trackbar position - HandleControlChangeNotification(); - - // Update the numeric representation of the trackbar - UpdateValueText(); - -Exit: - return(hr); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CLongWidget<_TYPE_>::HandleControlChangeNotification -// -// Description: -// Handles widget change notifications -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -template <class _TYPE_> -HRESULT CLongWidget<_TYPE_>::HandleControlChangeNotification() -{ - ATLASSERT(m_spDevSpecControl); - ATLASSERT(m_hwndTrackbar); - - HRESULT hr = S_OK; - DWORD cbValue = sizeof(m_Value); - - // Get current value - hr = m_spDevSpecControl->GetValue(&m_Value, &cbValue); - - if (SUCCEEDED(hr)) - { - float fPos = (float)(m_Value - m_Min) / (float)(m_Max - m_Min); - - // Update trackbar position - TrackBar_SetPos(m_hwndTrackbar, (int)(fPos * 100.f)); - } - - return(hr); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CLongWidget<_TYPE_>::CommitValue -// -// Description: -// Commit the value set on the control -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -template <class _TYPE_> -HRESULT CLongWidget<_TYPE_>::CommitValue() -{ - ATLASSERT(m_spDevSpecControl); - ATLASSERT(m_hwndTrackbar); - - HRESULT hr = S_OK; - float fPos; - DWORD cbValue = sizeof(m_Value); - - // Calculate new value from trackbar position - fPos = (float)TrackBar_GetPos(m_hwndTrackbar) / 100.f; - m_Value = (_TYPE_)((float)(m_Max - m_Min) * fPos) + m_Min; - - // Commit current setting of trackbar - hr = m_spDevSpecControl->SetValue(&m_Value, cbValue, GetEventContext()); - - return(hr); -}; - - -// ---------------------------------------------------------------------------- -// Function: -// CLongWidget<_TYPE_>::DlgProc -// -// Description: -// Callback for widget dialog -// -// Parameters: -// hwndDlg - [in] Handle to the widget dialog -// uMsg - [in] Specifies the message -// wParam - [in] Specifies additional message-specific information -// lParam - [in] Specifies additional message-specific information -// -// Return values: -// TRUE if it processed the message, FALSE if not -// ---------------------------------------------------------------------------- -template <class _TYPE_> -INT_PTR CALLBACK CLongWidget<_TYPE_>::DlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - UNREFERENCED_PARAMETER(wParam); - - CLongWidget<_TYPE_>* pthis = (CLongWidget<_TYPE_>*) - (LONG_PTR)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - - BOOL fRet = FALSE; - - switch (msg) - { - case WM_INITDIALOG: - { - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam); - fRet = FALSE; // don't set focus - break; - } - - case WM_DESTROY: - { - // Don't delete. The Widget destructor is what posts the WM_DESTROY - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, NULL); - fRet = TRUE; - break; - } - - case WM_HSCROLL: - - if (pthis) - { - pthis->m_Value = TrackBar_GetPos(pthis->m_hwndTrackbar); - pthis->UpdateValueText(); - - // Enable the Apply button upon user changing the control - SendMessage(GetParent(GetParent(hwndDlg)), PSM_CHANGED, (WPARAM)(GetParent(hwndDlg)), 0); - } - fRet = TRUE; - break; - } - - return(fRet); -} - - -// ---------------------------------------------------------------------------- -// Function: -// CLongWidget<_TYPE_>::UpdateValueText -// -// Description: -// Updates the numeric representation of the trackbar -// -// Return values: -// S_OK if successful -// ---------------------------------------------------------------------------- -template <class _TYPE_> -void CLongWidget<_TYPE_>::UpdateValueText() -{ - WCHAR wsz[12]; - - StringCbPrintfW(wsz, sizeof(wsz), L"0x%08x", m_Value); - - // Set new text - SetWindowText(m_hwndValue, wsz); -} diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/makefile b/audio/sysvad/SwapAPO/PropPageExtensions/makefile deleted file mode 100644 index c7837f4f..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/makefile +++ /dev/null @@ -1,36 +0,0 @@ -############################################################################# -# -# Copyright (c) Microsoft Corporation. -# All Rights Reserved. -# -# Makefile for wdm\audio\sysfx\apo -# -############################################################################# - -## NT BUILD ENVIROMENT - -# -# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source -# file to this component. This file merely indirects to the real make file -# that is shared by all the components of NT. -# -!if defined(IA64) -!message This sample is not to be built for IA64 targets -!else - -!IF DEFINED(_NT_TARGET_VERSION) -#! IF $(_NT_TARGET_VERSION)>=0x501 -! IF $(_NT_TARGET_VERSION)>=0x600 -! INCLUDE $(NTMAKEENV)\makefile.def -! ELSE -# Only warn once per directory -! INCLUDE $(NTMAKEENV)\makefile.plt -! IF "$(BUILD_PASS)"=="PASS1" -! message BUILDMSG: Warning : Building the sample "$(MAKEDIR)" for downlevel build environments is temporarily disabled in WDK for Beta2. -! ENDIF -! ENDIF -!ELSE -! INCLUDE $(NTMAKEENV)\makefile.def -!ENDIF - -!endif
\ No newline at end of file diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/music.ico b/audio/sysvad/SwapAPO/PropPageExtensions/music.ico Binary files differdeleted file mode 100644 index 3207a9dc..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/music.ico +++ /dev/null diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/resource.h b/audio/sysvad/SwapAPO/PropPageExtensions/resource.h deleted file mode 100644 index a8d36a5a..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/resource.h +++ /dev/null @@ -1,34 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by CplExt.rc -// -#define IDC_DISABLE_SYSFX 5000 // The "Disable System Effects" UI control must have ID 5000 -#define IDS_PROJ_NAME 100 -#define IDR_CPL_EXT 101 -#define IDR_SWAP_PROP_PAGE 102 -#define IDR_ADV_ENDPOINT_PROP_PAGE 103 -#define IDI_AUDIO_ICON 200 -#define IDD_SWAP_PROP_PAGE 201 -#define IDC_ENABLE_SWAP_SFX 203 -#define IDC_ENABLE_SWAP_MFX 204 -#define IDC_SPP_ENDPOINT_NAME 205 -#define IDD_ADV_ENDPOINT_PROP_PAGE 210 -#define IDC_NO_ADV_CONTROLS_FOUND 211 -#define IDC_EPP_ENDPOINT_NAME 212 -#define IDD_WIDGET_GEN_LONG 213 -#define IDC_GEN_LABEL 214 -#define IDC_GEN_SLIDER 215 -#define IDC_GEN_VALUE 216 -#define IDC_ENABLE_DELAY_SFX 217 -#define IDC_ENABLE_DELAY_MFX 218 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 230 -#define _APS_NEXT_COMMAND_VALUE 32768 -#define _APS_NEXT_CONTROL_VALUE 225 -#define _APS_NEXT_SYMED_VALUE 104 -#endif -#endif diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/sources b/audio/sysvad/SwapAPO/PropPageExtensions/sources deleted file mode 100644 index 898884b6..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/sources +++ /dev/null @@ -1,60 +0,0 @@ -TARGETNAME=PropPageExt -TARGETTYPE=DYNLINK - -USE_ATL=1 - -USE_NATIVE_EH=1 - - -DLLENTRY=_DllMainCRTStartup -PRECOMPILED_CXX=1 -PRECOMPILED_INCLUDE=stdafx.h -PRECOMPILED_PCH=stdafx.pch - -MSC_WARNING_LEVEL=-W4 \ - -WX - -# -# stdafx.h defines _ATL_ALL_WARNINGS -# Disabling 4127 is necessary to allow this driver to build in the WDK environment. -# -USER_C_FLAGS=/wd4127 - -C_DEFINES=-DUNICODE \ - -D_UNICODE - -# -# Indicate to the WDK that this sample only supports Win10[+] -# -MINIMUM_NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WINTHRESHOLD) - -# Indicate that this DLL must be included in the driver package -DDK_NO_PACKAGE_PROJECT=0 -DDK_INCLUDE_PACKAGE_PROJECT=1 - -INCLUDES=$(INCLUDES); \ - ..\Inc; \ - $(DDK_INC_PATH); -SOURCES=CplExt.idl \ - CplExt.rc \ - CplExt.cpp \ - SwapPropPage.cpp \ - AdvEndpointPropPage.cpp \ - UIWidgets.cpp \ - TopologyExaminers.cpp \ - Parts.cpp \ - - -TARGETLIBS= \ - \ - $(SDK_LIB_PATH)\onecore_downlevel.lib \ - $(ONECORE_PRIV_SDK_LIB_PATH)\OneCore_Forwarder_user32.lib \ - $(SDK_LIB_PATH)\onecore_downlevel.lib \ - $(SDK_LIB_PATH)\oleaut32.lib \ - $(INTERNAL_SDK_LIB_PATH)\onecoreuapuuid.lib \ - $(SDK_LIB_PATH)\shlwapi.lib \ - $(SDK_LIB_PATH)\comctl32.lib \ - $(SDK_LIB_PATH)\rpcrt4.lib \ - - - diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/stdafx.cpp b/audio/sysvad/SwapAPO/PropPageExtensions/stdafx.cpp deleted file mode 100644 index 26e28d90..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/stdafx.cpp +++ /dev/null @@ -1,18 +0,0 @@ -//**@@@*@@@**************************************************** -// -// Microsoft Windows -// Copyright (C) Microsoft Corporation. All rights reserved. -// -//**@@@*@@@**************************************************** - -// -// FileName: stdafx.cpp -// -// Abstract: Source file that includes just the standard includes -// -// ---------------------------------------------------------------------------- - - -#include "stdafx.h" - -_Analysis_mode_(_Analysis_code_type_user_driver_) diff --git a/audio/sysvad/SwapAPO/PropPageExtensions/stdafx.h b/audio/sysvad/SwapAPO/PropPageExtensions/stdafx.h deleted file mode 100644 index a116cf07..00000000 --- a/audio/sysvad/SwapAPO/PropPageExtensions/stdafx.h +++ /dev/null @@ -1,67 +0,0 @@ -//**@@@*@@@**************************************************** -// -// Microsoft Windows -// Copyright (C) Microsoft Corporation. All rights reserved. -// -//**@@@*@@@**************************************************** - -// -// FileName: stdafx.h -// -// Abstract: Include file for standard system include files, or project -// specific include files that are used frequently, but are -// changed infrequently -// -// ---------------------------------------------------------------------------- - - -#pragma once - -#ifndef STRICT -#define STRICT -#endif - -//// Modify the following defines if you have to target a platform prior to the ones specified below. -//// Refer to MSDN for the latest info on corresponding values for different platforms. -//#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later. -//#define WINVER 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. -//#endif -// -//#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later. -//#define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target Windows 2000 or later. -//#endif -// -//#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. -//#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. -//#endif -// -//#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later. -//#define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later. -//#endif - -#define _ATL_APARTMENT_THREADED -#define _ATL_NO_AUTOMATIC_NAMESPACE - -#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit - -// Turns off ATL's hiding of some common and often safely ignored warning messages -#define _ATL_ALL_WARNINGS - -#define _ATL_NO_HOSTING - -#include "resource.h" -#include <atlbase.h> -#include <atlcom.h> -#include <atlsync.h> -#include <atlwin.h> // atl windows -using namespace ATL; - -#include <strsafe.h> -#include <commonmacros.h> -#include <tlist.h> -#include <shlobj.h> -#include "CplExt.h" - -extern HINSTANCE g_hInstance; - -_Analysis_mode_(_Analysis_code_type_user_driver_) diff --git a/audio/sysvad/TabletAudioSample/ComponentizedApoSample.inf b/audio/sysvad/TabletAudioSample/ComponentizedApoSample.inf Binary files differnew file mode 100644 index 00000000..a60abe3f --- /dev/null +++ b/audio/sysvad/TabletAudioSample/ComponentizedApoSample.inf diff --git a/audio/sysvad/TabletAudioSample/ComponentizedAudioSample.inf b/audio/sysvad/TabletAudioSample/ComponentizedAudioSample.inf Binary files differnew file mode 100644 index 00000000..6e380029 --- /dev/null +++ b/audio/sysvad/TabletAudioSample/ComponentizedAudioSample.inf diff --git a/audio/sysvad/TabletAudioSample/ComponentizedAudioSampleExtension.inf b/audio/sysvad/TabletAudioSample/ComponentizedAudioSampleExtension.inf Binary files differnew file mode 100644 index 00000000..d91e44ba --- /dev/null +++ b/audio/sysvad/TabletAudioSample/ComponentizedAudioSampleExtension.inf diff --git a/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj b/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj index 272a3b97..48c5665e 100644 --- a/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj +++ b/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj @@ -32,7 +32,7 @@ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> @@ -40,7 +40,7 @@ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> @@ -48,7 +48,7 @@ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>False</UseDebugLibraries> - <DriverTargetPlatform>Desktop</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|Win32'"> <TargetVersion>Windows10</TargetVersion> <UseDebugLibraries>True</UseDebugLibraries> - <DriverTargetPlatform>Desktop</DriverTargetPlatform> + <DriverTargetPlatform>Universal</DriverTargetPlatform> <DriverType>KMDF</DriverType> <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset> <ConfigurationType>Driver</ConfigurationType> @@ -185,7 +185,7 @@ <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories> <ExceptionHandling> </ExceptionHandling> <DisableSpecificWarnings>4595;%(DisableSpecificWarnings)</DisableSpecificWarnings> @@ -193,12 +193,12 @@ <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories> </ResourceCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> @@ -208,7 +208,7 @@ <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories> <ExceptionHandling> </ExceptionHandling> <DisableSpecificWarnings>4595;%(DisableSpecificWarnings)</DisableSpecificWarnings> @@ -216,12 +216,12 @@ <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories> </ResourceCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> @@ -231,7 +231,7 @@ <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories> <ExceptionHandling> </ExceptionHandling> <DisableSpecificWarnings>4595;%(DisableSpecificWarnings)</DisableSpecificWarnings> @@ -239,12 +239,12 @@ <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories> </ResourceCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> @@ -254,7 +254,7 @@ <ClCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories> <ExceptionHandling> </ExceptionHandling> <DisableSpecificWarnings>4595;%(DisableSpecificWarnings)</DisableSpecificWarnings> @@ -262,12 +262,12 @@ <Midl> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories> </Midl> <ResourceCompile> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions> - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories> </ResourceCompile> </ItemDefinitionGroup> <ItemGroup> @@ -296,4 +296,4 @@ <ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> -</Project>
\ No newline at end of file +</Project> diff --git a/audio/sysvad/TabletAudioSample/tabletaudiosample.inf b/audio/sysvad/TabletAudioSample/tabletaudiosample.inf Binary files differindex c9f533af..8a0eb788 100644 --- a/audio/sysvad/TabletAudioSample/tabletaudiosample.inf +++ b/audio/sysvad/TabletAudioSample/tabletaudiosample.inf diff --git a/audio/sysvad/ToneGenerator.cpp b/audio/sysvad/ToneGenerator.cpp index 807c50c3..2a01e49a 100644 --- a/audio/sysvad/ToneGenerator.cpp +++ b/audio/sysvad/ToneGenerator.cpp @@ -21,6 +21,14 @@ const double TWO_PI = M_PI * 2; extern DWORD g_DisableToneGenerator; // +// Double to long conversion. +// +long ConvertToLong(double Value) +{ + return (long)(Value * _I32_MAX); +}; + +// // Double to short conversion. // short ConvertToShort(double Value) @@ -97,11 +105,23 @@ VOID ToneGenerator::InitNewFrame unsigned char *dataBuffer = reinterpret_cast<unsigned char *>(Frame); dataBuffer[i] = ConvertToUChar(sinValue); } - else // 16 bits per sample + else if (m_BitsPerSample == 16) { short *dataBuffer = reinterpret_cast<short *>(Frame); dataBuffer[i] = ConvertToShort(sinValue); } + else if (m_BitsPerSample == 24) + { + BYTE *dataBuffer = Frame; + long val = ConvertToLong(sinValue); + val = val >> 8; + RtlCopyMemory(dataBuffer, &val, 3); + } + else if (m_BitsPerSample == 32) + { + long *dataBuffer = reinterpret_cast<long *>(Frame); + dataBuffer[i] = ConvertToLong(sinValue); + } } m_Theta += m_SampleIncrement; @@ -120,7 +140,6 @@ VOID ToneGenerator::InitNewFrame // Buffer - Buffer to hold the samples // BufferLength - Length of the buffer. // -// Note: this function supports 16bit and 8bit samples only. // void ToneGenerator::GenerateSine ( @@ -210,13 +229,11 @@ NTSTATUS ToneGenerator::Init KFLOATING_SAVE saveData; // - // This sample supports PCM 16bit formats only. + // This sample supports PCM formats only. // if ((WfExt->Format.wFormatTag != WAVE_FORMAT_PCM && !(WfExt->Format.wFormatTag == WAVE_FORMAT_EXTENSIBLE && - IsEqualGUIDAligned(WfExt->SubFormat, KSDATAFORMAT_SUBTYPE_PCM))) || - (WfExt->Format.wBitsPerSample != 16 && - WfExt->Format.wBitsPerSample != 8)) + IsEqualGUIDAligned(WfExt->SubFormat, KSDATAFORMAT_SUBTYPE_PCM)))) { status = STATUS_NOT_SUPPORTED; } diff --git a/audio/sysvad/common.cpp b/audio/sysvad/common.cpp index d046d336..a4c8f5e2 100644 --- a/audio/sysvad/common.cpp +++ b/audio/sysvad/common.cpp @@ -8,7 +8,7 @@ Module Name: Abstract: - Implementation of the AdapterCommon class. + Implementation of the AdapterCommon class. --*/ @@ -29,7 +29,7 @@ Abstract: #include "bthhfpminipairs.h" // # of sec before sync request is cancelled. -#define BTH_HFP_SYNC_REQ_TIMEOUT_IN_SEC 60 +#define BTH_HFP_SYNC_REQ_TIMEOUT_IN_SEC 60 #define BTH_HFP_NOTIFICATION_MAX_ERROR_COUNT 5 #endif // SYSVAD_BTH_BYPASS @@ -50,18 +50,18 @@ class BthHfpDevice; // Forward declaration. /////////////////////////////////////////////////////////////////////////////// // CAdapterCommon -// -class CAdapterCommon : +// +class CAdapterCommon : public IAdapterCommon, public IAdapterPowerManagement, - public CUnknown + public CUnknown { private: PSERVICEGROUP m_pServiceGroupWave; PDEVICE_OBJECT m_pDeviceObject; PDEVICE_OBJECT m_pPhysicalDeviceObject; - WDFDEVICE m_WdfDevice; // Wdf device. - DEVICE_POWER_STATE m_PowerState; + WDFDEVICE m_WdfDevice; // Wdf device. + DEVICE_POWER_STATE m_PowerState; PCSYSVADHW m_pHW; // Virtual SYSVAD HW object PPORTCLSETWHELPER m_pPortClsEtwHelper; @@ -82,21 +82,21 @@ class CAdapterCommon : IMP_IAdapterPowerManagement; //===================================================================== - // IAdapterCommon methods + // IAdapterCommon methods STDMETHODIMP_(NTSTATUS) Init - ( + ( _In_ PDEVICE_OBJECT DeviceObject ); STDMETHODIMP_(PDEVICE_OBJECT) GetDeviceObject(void); - + STDMETHODIMP_(PDEVICE_OBJECT) GetPhysicalDeviceObject(void); - + STDMETHODIMP_(WDFDEVICE) GetWdfDevice(void); STDMETHODIMP_(void) SetWaveServiceGroup - ( + ( _In_ PSERVICEGROUP ServiceGroup ); @@ -142,26 +142,26 @@ class CAdapterCommon : STDMETHODIMP_(void) MixerReset(void); STDMETHODIMP_(LONG) MixerVolumeRead - ( + ( _In_ ULONG Index, _In_ ULONG Channel ); STDMETHODIMP_(void) MixerVolumeWrite - ( + ( _In_ ULONG Index, _In_ ULONG Channel, - _In_ LONG Value + _In_ LONG Value ); STDMETHODIMP_(LONG) MixerPeakMeterRead - ( + ( _In_ ULONG Index, _In_ ULONG Channel ); - STDMETHODIMP_(NTSTATUS) WriteEtwEvent - ( + STDMETHODIMP_(NTSTATUS) WriteEtwEvent + ( _In_ EPcMiniportEngineEvent miniportEventType, _In_ ULONGLONG ullData1, _In_ ULONGLONG ullData2, @@ -169,13 +169,13 @@ class CAdapterCommon : _In_ ULONGLONG ullData4 ); - STDMETHODIMP_(VOID) SetEtwHelper - ( + STDMETHODIMP_(VOID) SetEtwHelper + ( PPORTCLSETWHELPER _pPortClsEtwHelper ); - + STDMETHODIMP_(NTSTATUS) InstallSubdevice - ( + ( _In_opt_ PIRP Irp, _In_ PWSTR Name, _In_ REFGUID PortClassId, @@ -191,12 +191,12 @@ class CAdapterCommon : _Out_opt_ PUNKNOWN * OutPortUnknown, _Out_opt_ PUNKNOWN * OutMiniportUnknown ); - + STDMETHODIMP_(NTSTATUS) UnregisterSubdevice ( _In_opt_ PUNKNOWN UnknownPort ); - + STDMETHODIMP_(NTSTATUS) ConnectTopologies ( _In_ PUNKNOWN UnknownTopology, @@ -204,7 +204,7 @@ class CAdapterCommon : _In_ PHYSICALCONNECTIONTABLE* PhysicalConnections, _In_ ULONG PhysicalConnectionCount ); - + STDMETHODIMP_(NTSTATUS) DisconnectTopologies ( _In_ PUNKNOWN UnknownTopology, @@ -212,10 +212,10 @@ class CAdapterCommon : _In_ PHYSICALCONNECTIONTABLE* PhysicalConnections, _In_ ULONG PhysicalConnectionCount ); - + STDMETHODIMP_(NTSTATUS) InstallEndpointFilters ( - _In_opt_ PIRP Irp, + _In_opt_ PIRP Irp, _In_ PENDPOINT_MINIPAIR MiniportPair, _In_opt_ PVOID DeviceContext, _Out_opt_ PUNKNOWN * UnknownTopology, @@ -223,7 +223,7 @@ class CAdapterCommon : _Out_opt_ PUNKNOWN * UnknownMiniportTopology, _Out_opt_ PUNKNOWN * UnknownMiniportWave ); - + STDMETHODIMP_(NTSTATUS) RemoveEndpointFilters ( _In_ PENDPOINT_MINIPAIR MiniportPair, @@ -248,23 +248,23 @@ class CAdapterCommon : #ifdef SYSVAD_BTH_BYPASS STDMETHODIMP_(NTSTATUS) InitBthScoBypass(); - + STDMETHODIMP_(VOID) CleanupBthScoBypass(); #endif // SYSVAD_BTH_BYPASS STDMETHODIMP_(VOID) Cleanup(); - + //===================================================================== // friends friend NTSTATUS NewAdapterCommon - ( + ( _Out_ PUNKNOWN * Unknown, _In_ REFCLSID, _In_opt_ PUNKNOWN UnknownOuter, _When_((PoolType & NonPagedPoolMustSucceed) != 0, __drv_reportError("Must succeed pool allocations are forbidden. " "Allocation failures cause a system crash")) - _In_ POOL_TYPE PoolType + _In_ POOL_TYPE PoolType ); #ifdef SYSVAD_BTH_BYPASS @@ -282,12 +282,12 @@ class CAdapterCommon : BOOL m_BthHfpEnableCleanup; // Do cleanup if true. private: - static + static DRIVER_NOTIFICATION_CALLBACK_ROUTINE EvtBthHfpScoBypassInterfaceChange; - - static + + static EVT_WDF_WORKITEM EvtBthHfpScoBypassInterfaceWorkItem; - + protected: BthHfpDevice * BthHfpDeviceFind ( @@ -323,7 +323,7 @@ class CAdapterCommon : _In_ PUNKNOWN UnknownPort, _In_ PUNKNOWN UnknownMiniport ); - + NTSTATUS RemoveCachedSubdevice ( _In_ PWSTR Name @@ -450,33 +450,33 @@ struct BthHfpEventCallback // This class represents a the Bluetooth Hands-Free Profile SCO Bypass device. // There is one class for each interface (id = symbolic-link-name). // -class BthHfpDevice : +class BthHfpDevice : IBthHfpDeviceCommon, - public CUnknown + public CUnknown { private: eBthHfpState m_State; - + CAdapterCommon * m_Adapter; WDFIOTARGET m_WdfIoTarget; - + LIST_ENTRY m_ListEntry; UNICODE_STRING m_SymbolicLinkName; - + // // The Topo Filter Desc and Topo Pins structures referenced from - // the Miniports structure are deep copies: they start as copies of the - // static structures and are modified to allow per-SCO-Device pin - // categories based on the info obtained from + // the Miniports structure are deep copies: they start as copies of the + // static structures and are modified to allow per-SCO-Device pin + // categories based on the info obtained from // IOCTL_BTHHFP_DEVICE_GET_DESCRIPTOR2 // PENDPOINT_MINIPAIR m_SpeakerMiniports; PENDPOINT_MINIPAIR m_MicMiniports; - + PUNKNOWN m_UnknownSpeakerTopology; PUNKNOWN m_UnknownSpeakerWave; PUNKNOWN m_UnknownMicTopology; - PUNKNOWN m_UnknownMicWave; + PUNKNOWN m_UnknownMicWave; PBTHHFP_DESCRIPTOR2 m_Descriptor; PKSPROPERTY_VALUES m_VolumePropValues; @@ -486,7 +486,7 @@ class BthHfpDevice : BOOL m_ConnectionStatus; LONG m_ConnectionStatusLong; }; // unnamed. - + union{ NTSTATUS m_StreamStatus; LONG m_StreamStatusLong; @@ -495,11 +495,11 @@ class BthHfpDevice : KEVENT m_StreamStatusEvent; // - // Set to TRUE when the HF (remote device) wants to disable the + // Set to TRUE when the HF (remote device) wants to disable the // NR + EC of the AG (local system). // LONG m_NRECDisableStatusLong; - + WDFREQUEST m_StreamReq; WDFREQUEST m_SpeakerVolumeReq; WDFREQUEST m_MicVolumeReq; @@ -525,7 +525,7 @@ class BthHfpDevice : NTSTATUS Init ( - _In_ CAdapterCommon * Adapter, + _In_ CAdapterCommon * Adapter, _In_ PUNICODE_STRING SymbolicLinkName ); @@ -548,7 +548,7 @@ class BthHfpDevice : } static - BthHfpDevice * + BthHfpDevice * GetBthHfpDevice ( _In_ PLIST_ENTRY le @@ -560,69 +560,69 @@ class BthHfpDevice : public: //===================================================================== // - // IBthHfpDeviceCommon functions. + // IBthHfpDeviceCommon functions. // STDMETHODIMP_(BOOL) IsVolumeSupported(); - + STDMETHODIMP_(PKSPROPERTY_VALUES) GetVolumeSettings ( - _Out_ PULONG Size + _Out_ PULONG Size ); - + STDMETHODIMP_(LONG) GetSpeakerVolume(); - + STDMETHODIMP_(NTSTATUS) SetSpeakerVolume ( _In_ ULONG Volume ); - + STDMETHODIMP_(LONG) GetMicVolume(); - + STDMETHODIMP_(NTSTATUS) SetMicVolume ( _In_ ULONG Volume ); - + STDMETHODIMP_(BOOL) GetConnectionStatus(); - + STDMETHODIMP_(NTSTATUS) Connect(); - + STDMETHODIMP_(NTSTATUS) Disconnect(); - + STDMETHODIMP_(BOOL) GetStreamStatus(); - + STDMETHODIMP_(NTSTATUS) StreamOpen(); - + STDMETHODIMP_(NTSTATUS) StreamClose(); - + STDMETHODIMP_(GUID) GetContainerId(); - + STDMETHODIMP_(VOID) SetSpeakerVolumeHandler ( _In_opt_ PFNEVENTNOTIFICATION EventHandler, _In_opt_ PVOID EventHandlerContext ); - + STDMETHODIMP_(VOID) SetSpeakerConnectionStatusHandler ( _In_opt_ PFNEVENTNOTIFICATION EventHandler, _In_opt_ PVOID EventHandlerContext ); - + STDMETHODIMP_(VOID) SetMicVolumeHandler ( _In_opt_ PFNEVENTNOTIFICATION EventHandler, _In_opt_ PVOID EventHandlerContext ); - + STDMETHODIMP_(VOID) SetMicConnectionStatusHandler ( _In_opt_ PFNEVENTNOTIFICATION EventHandler, _In_opt_ PVOID EventHandlerContext ); - + STDMETHODIMP_(BOOL) IsNRECSupported(); - + STDMETHODIMP_(BOOL) GetNRECDisableStatus(); private: @@ -640,7 +640,7 @@ class BthHfpDevice : _When_(InLength == 0 && OutLength == 0, _In_opt_) PVOID Buffer ); - + NTSTATUS SendIoCtrlAsynchronously ( _In_ WDFREQUEST Request, @@ -650,51 +650,51 @@ class BthHfpDevice : _In_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine, _In_ WDFCONTEXT Context ); - + NTSTATUS GetBthHfpDescriptor ( _Out_ PBTHHFP_DESCRIPTOR2 * Descriptor ); - + NTSTATUS EnableBthHfpNrecDisableStatusNotification(); - + NTSTATUS GetBthHfpVolumePropertyValues ( _In_ ULONG Length, _Out_ PKSPROPERTY_VALUES * PropValues ); - + NTSTATUS SetBthHfpSpeakerVolume ( - _In_ LONG Volume + _In_ LONG Volume ); - + NTSTATUS GetBthHfpSpeakerVolume ( - _Out_ LONG * Volume + _Out_ LONG * Volume ); - + NTSTATUS EnableBthHfpSpeakerVolumeStatusNotification(); - + NTSTATUS SetBthHfpMicVolume ( - _In_ LONG Volume + _In_ LONG Volume ); - + NTSTATUS GetBthHfpMicVolume ( - _Out_ LONG * Volume + _Out_ LONG * Volume ); - + NTSTATUS EnableBthHfpMicVolumeStatusNotification(); - + NTSTATUS GetBthHfpConnectionStatus ( - _Out_ BOOL * ConnectionStatus + _Out_ BOOL * ConnectionStatus ); - + NTSTATUS EnableBthHfpConnectionStatusNotification(); - + static NTSTATUS CreateCustomEndpointMinipair ( @@ -717,24 +717,24 @@ class BthHfpDevice : ( _In_ PENDPOINT_MINIPAIR CustomMinipair ); - + NTSTATUS GetBthHfpCodecId ( _Out_ UCHAR * CodecId ); NTSTATUS SetBthHfpConnect(); - + NTSTATUS SetBthHfpDisconnect(); NTSTATUS SetBthHfpStreamOpen(); NTSTATUS SetBthHfpStreamClose(); - + NTSTATUS EnableBthHfpStreamStatusNotification(); - + NTSTATUS StopBthHfpStreamStatusNotification(); - + // // WDF I/O Target callback. // @@ -750,12 +750,12 @@ class BthHfpDevice : // // Status notifications callbacks. // - static + static EVT_WDF_REQUEST_COMPLETION_ROUTINE EvtBthHfpDeviceStreamStatusCompletion; - static + static EVT_WDF_REQUEST_COMPLETION_ROUTINE EvtBthHfpDeviceNotificationStatusCompletion; - + static EVT_WDF_WORKITEM EvtBthHfpDeviceNotificationStatusWorkItem; }; @@ -805,14 +805,14 @@ NTSTATUS SysvadIoSetDeviceInterfacePropertyDataMultiple #pragma code_seg("PAGE") NTSTATUS NewAdapterCommon -( +( _Out_ PUNKNOWN * Unknown, _In_ REFCLSID, _In_opt_ PUNKNOWN UnknownOuter, _When_((PoolType & NonPagedPoolMustSucceed) != 0, __drv_reportError("Must succeed pool allocations are forbidden. " "Allocation failures cause a system crash")) - _In_ POOL_TYPE PoolType + _In_ POOL_TYPE PoolType ) /*++ @@ -822,7 +822,7 @@ Routine Description: Arguments: - Unknown - + Unknown - UnknownOuter - @@ -842,7 +842,7 @@ Return Value: // // This sample supports only one instance of this object. - // (b/c of CSaveData's static members and Bluetooth HFP logic). + // (b/c of CSaveData's static members and Bluetooth HFP logic). // if (InterlockedCompareExchange(&CAdapterCommon::m_AdapterInstances, 1, 0) != 0) { @@ -850,7 +850,7 @@ Return Value: DPF(D_ERROR, ("NewAdapterCommon failed, only one instance is allowed")); goto Done; } - + // // Allocate an adapter object. // @@ -862,22 +862,22 @@ Return Value: goto Done; } - // + // // Success. // *Unknown = PUNKNOWN((PADAPTERCOMMON)(p)); - (*Unknown)->AddRef(); - ntStatus = STATUS_SUCCESS; + (*Unknown)->AddRef(); + ntStatus = STATUS_SUCCESS; -Done: +Done: return ntStatus; } // NewAdapterCommon //============================================================================= #pragma code_seg("PAGE") CAdapterCommon::~CAdapterCommon -( - void +( + void ) /*++ @@ -901,12 +901,12 @@ Return Value: delete m_pHW; m_pHW = NULL; } - + CSaveData::DestroyWorkItems(); SAFE_RELEASE(m_pPortClsEtwHelper); SAFE_RELEASE(m_pServiceGroupWave); - + if (m_WdfDevice) { WdfObjectDelete(m_WdfDevice); @@ -915,11 +915,11 @@ Return Value: InterlockedDecrement(&CAdapterCommon::m_AdapterInstances); ASSERT(CAdapterCommon::m_AdapterInstances == 0); -} // ~CAdapterCommon +} // ~CAdapterCommon //============================================================================= #pragma code_seg("PAGE") -STDMETHODIMP_(PDEVICE_OBJECT) +STDMETHODIMP_(PDEVICE_OBJECT) CAdapterCommon::GetDeviceObject ( void @@ -939,13 +939,13 @@ Return Value: --*/ { PAGED_CODE(); - + return m_pDeviceObject; } // GetDeviceObject //============================================================================= #pragma code_seg("PAGE") -STDMETHODIMP_(PDEVICE_OBJECT) +STDMETHODIMP_(PDEVICE_OBJECT) CAdapterCommon::GetPhysicalDeviceObject ( void @@ -965,13 +965,13 @@ Return Value: --*/ { PAGED_CODE(); - + return m_pPhysicalDeviceObject; } // GetPhysicalDeviceObject //============================================================================= #pragma code_seg("PAGE") -STDMETHODIMP_(WDFDEVICE) +STDMETHODIMP_(WDFDEVICE) CAdapterCommon::GetWdfDevice ( void @@ -993,7 +993,7 @@ Return Value: --*/ { PAGED_CODE(); - + return m_WdfDevice; } // GetWdfDevice @@ -1001,8 +1001,8 @@ Return Value: #pragma code_seg("PAGE") NTSTATUS CAdapterCommon::Init -( - _In_ PDEVICE_OBJECT DeviceObject +( + _In_ PDEVICE_OBJECT DeviceObject ) /*++ @@ -1053,7 +1053,7 @@ Return Value: Done); // - // Create a WDF miniport to represent the adapter. Note that WDF miniports + // Create a WDF miniport to represent the adapter. Note that WDF miniports // are NOT audio miniports. An audio adapter is associated with a single WDF // miniport. This driver uses WDF to simplify the handling of the Bluetooth // SCO HFP Bypass interface. @@ -1070,7 +1070,7 @@ Return Value: Done); // Initialize HW. - // + // m_pHW = new (NonPagedPoolNx, SYSVAD_POOLTAG) CSYSVADHW; if (!m_pHW) { @@ -1078,7 +1078,7 @@ Return Value: ntStatus = STATUS_INSUFFICIENT_RESOURCES; } IF_FAILED_JUMP(ntStatus, Done); - + m_pHW->MixerReset(); // @@ -1097,8 +1097,8 @@ Done: #pragma code_seg("PAGE") STDMETHODIMP_(void) CAdapterCommon::MixerReset -( - void +( + void ) /*++ @@ -1115,7 +1115,7 @@ Return Value: --*/ { PAGED_CODE(); - + if (m_pHW) { m_pHW->MixerReset(); @@ -1125,60 +1125,60 @@ Return Value: //============================================================================= /* Here are the definitions of the standard miniport events. -Event type : eMINIPORT_IHV_DEFINED +Event type : eMINIPORT_IHV_DEFINED Parameter 1 : Defined and used by IHVs Parameter 2 : Defined and used by IHVs Parameter 3 :Defined and used by IHVs Parameter 4 :Defined and used by IHVs Event type: eMINIPORT_BUFFER_COMPLETE -Parameter 1: Current linear buffer position -Parameter 2: the previous WaveRtBufferWritePosition that the drive received +Parameter 1: Current linear buffer position +Parameter 2: the previous WaveRtBufferWritePosition that the drive received Parameter 3: Data length completed Parameter 4:0 Event type: eMINIPORT_PIN_STATE -Parameter 1: Current linear buffer position -Parameter 2: the previous WaveRtBufferWritePosition that the drive received -Parameter 3: Pin State 0->KS_STOP, 1->KS_ACQUIRE, 2->KS_PAUSE, 3->KS_RUN +Parameter 1: Current linear buffer position +Parameter 2: the previous WaveRtBufferWritePosition that the drive received +Parameter 3: Pin State 0->KS_STOP, 1->KS_ACQUIRE, 2->KS_PAUSE, 3->KS_RUN Parameter 4:0 Event type: eMINIPORT_GET_STREAM_POS -Parameter 1: Current linear buffer position -Parameter 2: the previous WaveRtBufferWritePosition that the drive received +Parameter 1: Current linear buffer position +Parameter 2: the previous WaveRtBufferWritePosition that the drive received Parameter 3: 0 Parameter 4:0 Event type: eMINIPORT_SET_WAVERT_BUFFER_WRITE_POS -Parameter 1: Current linear buffer position -Parameter 2: the previous WaveRtBufferWritePosition that the drive received +Parameter 1: Current linear buffer position +Parameter 2: the previous WaveRtBufferWritePosition that the drive received Parameter 3: the arget WaveRtBufferWritePosition received from portcls Parameter 4:0 Event type: eMINIPORT_GET_PRESENTATION_POS -Parameter 1: Current linear buffer position -Parameter 2: the previous WaveRtBufferWritePosition that the drive received +Parameter 1: Current linear buffer position +Parameter 2: the previous WaveRtBufferWritePosition that the drive received Parameter 3: Presentation position Parameter 4:0 -Event type: eMINIPORT_PROGRAM_DMA -Parameter 1: Current linear buffer position -Parameter 2: the previous WaveRtBufferWritePosition that the drive received +Event type: eMINIPORT_PROGRAM_DMA +Parameter 1: Current linear buffer position +Parameter 2: the previous WaveRtBufferWritePosition that the drive received Parameter 3: Starting WaveRt buffer offset Parameter 4: Data length Event type: eMINIPORT_GLITCH_REPORT -Parameter 1: Current linear buffer position -Parameter 2: the previous WaveRtBufferWritePosition that the drive received -Parameter 3: major glitch code: 1:WaveRT buffer is underrun, - 2:decoder errors, +Parameter 1: Current linear buffer position +Parameter 2: the previous WaveRtBufferWritePosition that the drive received +Parameter 3: major glitch code: 1:WaveRT buffer is underrun, + 2:decoder errors, 3:receive the same wavert buffer two in a row in event driven mode Parameter 4: minor code for the glitch cause Event type: eMINIPORT_LAST_BUFFER_RENDERED -Parameter 1: Current linear buffer position -Parameter 2: the very last WaveRtBufferWritePosition that the driver received +Parameter 1: Current linear buffer position +Parameter 2: the very last WaveRtBufferWritePosition that the driver received Parameter 3: 0 Parameter 4: 0 @@ -1186,7 +1186,7 @@ Parameter 4: 0 #pragma code_seg() STDMETHODIMP CAdapterCommon::WriteEtwEvent -( +( _In_ EPcMiniportEngineEvent miniportEventType, _In_ ULONGLONG ullData1, _In_ ULONGLONG ullData2, @@ -1207,12 +1207,12 @@ CAdapterCommon::WriteEtwEvent #pragma code_seg("PAGE") STDMETHODIMP_(void) CAdapterCommon::SetEtwHelper -( +( PPORTCLSETWHELPER _pPortClsEtwHelper ) { PAGED_CODE(); - + SAFE_RELEASE(m_pPortClsEtwHelper); m_pPortClsEtwHelper = _pPortClsEtwHelper; @@ -1227,9 +1227,9 @@ CAdapterCommon::SetEtwHelper #pragma code_seg("PAGE") STDMETHODIMP CAdapterCommon::NonDelegatingQueryInterface -( +( _In_ REFIID Interface, - _COM_Outptr_ PVOID * Object + _COM_Outptr_ PVOID * Object ) /*++ @@ -1239,7 +1239,7 @@ Routine Description: Arguments: - Interface - + Interface - Object - @@ -1283,8 +1283,8 @@ Return Value: #pragma code_seg("PAGE") STDMETHODIMP_(void) CAdapterCommon::SetWaveServiceGroup -( - _In_ PSERVICEGROUP ServiceGroup +( + _In_ PSERVICEGROUP ServiceGroup ) /*++ @@ -1301,7 +1301,7 @@ Return Value: { PAGED_CODE(); DPF_ENTER(("[CAdapterCommon::SetWaveServiceGroup]")); - + SAFE_RELEASE(m_pServiceGroupWave); m_pServiceGroupWave = ServiceGroup; @@ -1551,7 +1551,7 @@ Return Value: //============================================================================= #pragma code_seg() STDMETHODIMP_(ULONG) -CAdapterCommon::MixerMuxRead() +CAdapterCommon::MixerMuxRead() /*++ Routine Description: @@ -1613,7 +1613,7 @@ Return Value: #pragma code_seg() STDMETHODIMP_(LONG) CAdapterCommon::MixerVolumeRead -( +( _In_ ULONG Index, _In_ ULONG Channel ) @@ -1647,7 +1647,7 @@ Return Value: #pragma code_seg() STDMETHODIMP_(void) CAdapterCommon::MixerVolumeWrite -( +( _In_ ULONG Index, _In_ ULONG Channel, _In_ LONG Value @@ -1682,7 +1682,7 @@ Return Value: #pragma code_seg() STDMETHODIMP_(LONG) CAdapterCommon::MixerPeakMeterRead -( +( _In_ ULONG Index, _In_ ULONG Channel ) @@ -1716,8 +1716,8 @@ Return Value: #pragma code_seg() STDMETHODIMP_(void) CAdapterCommon::PowerChangeState -( - _In_ POWER_STATE NewState +( + _In_ POWER_STATE NewState ) /*++ @@ -1726,7 +1726,7 @@ Routine Description: Arguments: - NewState - The requested, new power state for the device. + NewState - The requested, new power state for the device. Return Value: @@ -1737,29 +1737,29 @@ Note: To assist the driver, PortCls will pause any active audio streams prior to calling this method to place the device in a sleep state. After calling this method, PortCls - will unpause active audio streams, to wake the device up. Miniports can opt for + will unpause active audio streams, to wake the device up. Miniports can opt for additional notification by utilizing the IPowerNotify interface. - The miniport driver must perform the requested change to the device's power state - before it returns from the PowerChangeState call. If the miniport driver needs to - save or restore any device state before a power-state change, the miniport driver + The miniport driver must perform the requested change to the device's power state + before it returns from the PowerChangeState call. If the miniport driver needs to + save or restore any device state before a power-state change, the miniport driver should support the IPowerNotify interface, which allows it to receive advance warning - of any such change. Before returning from a successful PowerChangeState call, the + of any such change. Before returning from a successful PowerChangeState call, the miniport driver should cache the new power state. - While the miniport driver is in one of the sleep states (any state other than + While the miniport driver is in one of the sleep states (any state other than PowerDeviceD0), it must avoid writing to the hardware. The miniport driver must cache any hardware accesses that need to be deferred until the device powers up again. If - the power state is changing from one of the sleep states to PowerDeviceD0, the + the power state is changing from one of the sleep states to PowerDeviceD0, the miniport driver should perform any deferred hardware accesses after it has powered up - the device. If the power state is changing from PowerDeviceD0 to a sleep state, the + the device. If the power state is changing from PowerDeviceD0 to a sleep state, the miniport driver can perform any necessary hardware accesses during the PowerChangeState call before it powers down the device. While powered down, a miniport driver is never asked to create a miniport driver object or stream object. PortCls always places the device in the PowerDeviceD0 state before calling the miniport driver's NewStream method. - + --*/ { DPF_ENTER(("[CAdapterCommon::PowerChangeState]")); @@ -1791,15 +1791,15 @@ Note: m_PowerState = NewState.DeviceState; DPF - ( - D_VERBOSE, - ("Entering D%u", ULONG(m_PowerState) - ULONG(PowerDeviceD0)) + ( + D_VERBOSE, + ("Entering D%u", ULONG(m_PowerState) - ULONG(PowerDeviceD0)) ); break; - + default: - + DPF(D_VERBOSE, ("Unknown Device Power State")); break; } @@ -1810,20 +1810,20 @@ Note: #pragma code_seg() STDMETHODIMP_(NTSTATUS) CAdapterCommon::QueryDeviceCapabilities -( - _Inout_updates_bytes_(sizeof(DEVICE_CAPABILITIES)) PDEVICE_CAPABILITIES PowerDeviceCaps +( + _Inout_updates_bytes_(sizeof(DEVICE_CAPABILITIES)) PDEVICE_CAPABILITIES PowerDeviceCaps ) /*++ Routine Description: - Called at startup to get the caps for the device. This structure provides - the system with the mappings between system power state and device power - state. This typically will not need modification by the driver. + Called at startup to get the caps for the device. This structure provides + the system with the mappings between system power state and device power + state. This typically will not need modification by the driver. Arguments: - PowerDeviceCaps - The device's capabilities. + PowerDeviceCaps - The device's capabilities. Return Value: @@ -1842,14 +1842,14 @@ Return Value: #pragma code_seg() STDMETHODIMP_(NTSTATUS) CAdapterCommon::QueryPowerChangeState -( - _In_ POWER_STATE NewStateQuery +( + _In_ POWER_STATE NewStateQuery ) /*++ Routine Description: - Query to see if the device can change to this power state + Query to see if the device can change to this power state Arguments: @@ -1954,7 +1954,7 @@ Done: #pragma code_seg("PAGE") STDMETHODIMP_(NTSTATUS) CAdapterCommon::InstallSubdevice -( +( _In_opt_ PIRP Irp, _In_ PWSTR Name, _In_ REFGUID PortClassId, @@ -1975,34 +1975,34 @@ CAdapterCommon::InstallSubdevice Routine Description: - This function creates and registers a subdevice consisting of a port - driver, a minport driver and a set of resources bound together. It will - also optionally place a pointer to an interface on the port driver in a - specified location before initializing the port driver. This is done so - that a common ISR can have access to the port driver during - initialization, when the ISR might fire. + This function creates and registers a subdevice consisting of a port + driver, a minport driver and a set of resources bound together. It will + also optionally place a pointer to an interface on the port driver in a + specified location before initializing the port driver. This is done so + that a common ISR can have access to the port driver during + initialization, when the ISR might fire. Arguments: Irp - pointer to the irp object. Name - name of the miniport. Passes to PcRegisterSubDevice - + PortClassId - port class id. Passed to PcNewPort. MiniportClassId - miniport class id. Passed to PcNewMiniport. - MiniportCreate - pointer to a miniport creation function. If NULL, + MiniportCreate - pointer to a miniport creation function. If NULL, PcNewMiniport is used. - + DeviceContext - deviceType specific. - MiniportPair - endpoint configuration info. + MiniportPair - endpoint configuration info. ResourceList - pointer to the resource list. PortInterfaceId - GUID that represents the port interface. - + OutPortInterface - pointer to store the port interface OutPortUnknown - pointer to store the unknown port interface. @@ -2045,9 +2045,9 @@ Return Value: { if (MiniportCreate) { - ntStatus = + ntStatus = MiniportCreate - ( + ( &miniport, MiniportClassId, NULL, @@ -2059,10 +2059,10 @@ Return Value: } else { - ntStatus = + ntStatus = PcNewMiniport ( - (PMINIPORT *) &miniport, + (PMINIPORT *) &miniport, MiniportClassId ); } @@ -2078,14 +2078,14 @@ Return Value: // still succeed. // #pragma warning(disable:6387) - ntStatus = + ntStatus = port->Init - ( + ( m_pDeviceObject, Irp, miniport, adapterCommon, - ResourceList + ResourceList ); #pragma warning (pop) @@ -2093,12 +2093,12 @@ Return Value: { // Register the subdevice (port/miniport combination). // - ntStatus = + ntStatus = PcRegisterSubdevice - ( + ( m_pDeviceObject, Name, - port + port ); } } @@ -2109,31 +2109,31 @@ Return Value: { if (OutPortUnknown) { - ntStatus = + ntStatus = port->QueryInterface - ( + ( IID_IUnknown, - (PVOID *)OutPortUnknown + (PVOID *)OutPortUnknown ); } if (OutPortInterface) { - ntStatus = + ntStatus = port->QueryInterface - ( + ( PortInterfaceId, - (PVOID *) OutPortInterface + (PVOID *) OutPortInterface ); } if (OutMiniportUnknown) { - ntStatus = + ntStatus = miniport->QueryInterface - ( + ( IID_IUnknown, - (PVOID *)OutMiniportUnknown + (PVOID *)OutMiniportUnknown ); } @@ -2179,10 +2179,10 @@ Return Value: DPF_ENTER(("[CAdapterCommon::UnregisterSubdevice]")); ASSERT(m_pDeviceObject != NULL); - + NTSTATUS ntStatus = STATUS_SUCCESS; PUNREGISTERSUBDEVICE unregisterSubdevice = NULL; - + if (NULL == UnknownPort) { return ntStatus; @@ -2191,7 +2191,7 @@ Return Value: // // Get the IUnregisterSubdevice interface. // - ntStatus = UnknownPort->QueryInterface( + ntStatus = UnknownPort->QueryInterface( IID_IUnregisterSubdevice, (PVOID *)&unregisterSubdevice); @@ -2209,7 +2209,7 @@ Return Value: // unregisterSubdevice->Release(); } - + return ntStatus; } @@ -2239,9 +2239,9 @@ Return Value: { PAGED_CODE(); DPF_ENTER(("[CAdapterCommon::ConnectTopologies]")); - + ASSERT(m_pDeviceObject != NULL); - + NTSTATUS ntStatus = STATUS_SUCCESS; // @@ -2251,13 +2251,13 @@ Return Value: // for (ULONG i = 0; i < PhysicalConnectionCount && NT_SUCCESS(ntStatus); i++) { - + switch(PhysicalConnections[i].eType) { case CONNECTIONTYPE_TOPOLOGY_OUTPUT: ntStatus = PcRegisterPhysicalConnection - ( + ( m_pDeviceObject, UnknownTopology, PhysicalConnections[i].ulTopology, @@ -2272,7 +2272,7 @@ Return Value: case CONNECTIONTYPE_WAVE_OUTPUT: ntStatus = PcRegisterPhysicalConnection - ( + ( m_pDeviceObject, UnknownWave, PhysicalConnections[i].ulWave, @@ -2285,7 +2285,7 @@ Return Value: } break; } - } + } // // Cleanup in case of error. @@ -2326,9 +2326,9 @@ Return Value: { PAGED_CODE(); DPF_ENTER(("[CAdapterCommon::DisconnectTopologies]")); - + ASSERT(m_pDeviceObject != NULL); - + NTSTATUS ntStatus = STATUS_SUCCESS; NTSTATUS ntStatus2 = STATUS_SUCCESS; PUNREGISTERPHYSICALCONNECTION unregisterPhysicalConnection = NULL; @@ -2336,12 +2336,12 @@ Return Value: // // Get the IUnregisterPhysicalConnection interface // - ntStatus = UnknownTopology->QueryInterface( + ntStatus = UnknownTopology->QueryInterface( IID_IUnregisterPhysicalConnection, (PVOID *)&unregisterPhysicalConnection); - + if (NT_SUCCESS(ntStatus)) - { + { for (ULONG i = 0; i < PhysicalConnectionCount; i++) { switch(PhysicalConnections[i].eType) @@ -2382,9 +2382,9 @@ Return Value: { ntStatus = ntStatus2; } - } + } } - + // // Release the IUnregisterPhysicalConnection interface. // @@ -2576,7 +2576,7 @@ CAdapterCommon::Cleanup() STDMETHODIMP_(NTSTATUS) CAdapterCommon::InstallEndpointFilters ( - _In_opt_ PIRP Irp, + _In_opt_ PIRP Irp, _In_ PENDPOINT_MINIPAIR MiniportPair, _In_opt_ PVOID DeviceContext, _Out_opt_ PUNKNOWN * UnknownTopology, @@ -2587,7 +2587,7 @@ CAdapterCommon::InstallEndpointFilters { PAGED_CODE(); DPF_ENTER(("[CAdapterCommon::InstallEndpointFilters]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; PUNKNOWN unknownTopology = NULL; PUNKNOWN unknownWave = NULL; @@ -2606,7 +2606,7 @@ CAdapterCommon::InstallEndpointFilters { *UnknownWave = NULL; } - + if (UnknownMiniportTopology) { *UnknownMiniportTopology = NULL; @@ -2627,7 +2627,7 @@ CAdapterCommon::InstallEndpointFilters ntStatus = InstallSubdevice(Irp, MiniportPair->TopoName, // make sure this name matches with SYSVAD.<TopoName>.szPname in the inf's [Strings] section CLSID_PortTopology, - CLSID_PortTopology, + CLSID_PortTopology, MiniportPair->TopoCreateCallback, MiniportPair->TopoInterfacePropertyCount, MiniportPair->TopoInterfaceProperties, @@ -2655,7 +2655,7 @@ CAdapterCommon::InstallEndpointFilters ntStatus = InstallSubdevice(Irp, MiniportPair->WaveName, // make sure this name matches with SYSVAD.<WaveName>.szPname in the inf's [Strings] section CLSID_PortWaveRT, - CLSID_PortWaveRT, + CLSID_PortWaveRT, MiniportPair->WaveCreateCallback, MiniportPair->WaveInterfacePropertyCount, MiniportPair->WaveInterfaceProperties, @@ -2663,7 +2663,7 @@ CAdapterCommon::InstallEndpointFilters MiniportPair, NULL, IID_IPortWaveRT, - NULL, + NULL, &unknownWave, &unknownMiniWave ); @@ -2698,7 +2698,7 @@ CAdapterCommon::InstallEndpointFilters unknownTopology->AddRef(); *UnknownTopology = unknownTopology; } - + if (UnknownWave != NULL && unknownWave != NULL) { unknownWave->AddRef(); @@ -2724,14 +2724,14 @@ CAdapterCommon::InstallEndpointFilters UnregisterSubdevice(unknownTopology); RemoveCachedSubdevice(MiniportPair->TopoName); } - + if (bWaveCreated && unknownWave != NULL) { UnregisterSubdevice(unknownWave); RemoveCachedSubdevice(MiniportPair->WaveName); } } - + SAFE_RELEASE(unknownMiniTopo); SAFE_RELEASE(unknownTopology); SAFE_RELEASE(unknownMiniWave); @@ -2752,9 +2752,9 @@ CAdapterCommon::RemoveEndpointFilters { PAGED_CODE(); DPF_ENTER(("[CAdapterCommon::RemoveEndpointFilters]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; - + if (UnknownTopology != NULL && UnknownWave != NULL) { ntStatus = DisconnectTopologies( @@ -2769,7 +2769,7 @@ CAdapterCommon::RemoveEndpointFilters } } - + RemoveCachedSubdevice(MiniportPair->WaveName); ntStatus = UnregisterSubdevice(UnknownWave); @@ -2790,7 +2790,7 @@ CAdapterCommon::RemoveEndpointFilters // All Done. // ntStatus = STATUS_SUCCESS; - + return ntStatus; } @@ -2808,8 +2808,8 @@ CAdapterCommon::GetFilters { PAGED_CODE(); DPF_ENTER(("[CAdapterCommon::GetFilters]")); - - NTSTATUS ntStatus = STATUS_SUCCESS; + + NTSTATUS ntStatus = STATUS_SUCCESS; PUNKNOWN unknownTopologyPort = NULL; PUNKNOWN unknownTopologyMiniport = NULL; PUNKNOWN unknownWavePort = NULL; @@ -2866,7 +2866,7 @@ CAdapterCommon::SetIdlePowerManagement PAGED_CODE(); DPF_ENTER(("[CAdapterCommon::SetIdlePowerManagement]")); - NTSTATUS ntStatus = STATUS_SUCCESS; + NTSTATUS ntStatus = STATUS_SUCCESS; IUnknown *pUnknown = NULL; PPORTCLSPOWER pPortClsPower = NULL; // refcounting disable requests. Each miniport is responsible for calling this in pairs, @@ -2878,7 +2878,7 @@ CAdapterCommon::SetIdlePowerManagement ntStatus = GetFilters(MiniportPair, NULL, NULL, &pUnknown, NULL); if (NT_SUCCESS(ntStatus)) { - ntStatus = + ntStatus = pUnknown->QueryInterface ( IID_IPortClsPower, @@ -2935,15 +2935,15 @@ Routine Description: Arguments: WorkItem - WDF work-item object. - + --*/ { PAGED_CODE(); DPF_ENTER(("[EvtBthHfpScoBypassInterfaceWorkItem]")); CAdapterCommon * This; - - if (WorkItem == NULL) + + if (WorkItem == NULL) { return; } @@ -2955,7 +2955,7 @@ Arguments: { PLIST_ENTRY le = NULL; BthHfpWorkTask * task = NULL; - + // // Retrieve a taask. // @@ -2967,7 +2967,7 @@ Arguments: InitializeListHead(le); } ExReleaseFastMutex(&This->m_BthHfpFastMutex); - + if (task == NULL) { break; @@ -2975,7 +2975,7 @@ Arguments: ASSERT(task->Device != NULL); _Analysis_assume_(task->Device != NULL); - + // // Process the task. // @@ -3023,7 +3023,7 @@ Routine Description: Arguments: SymbolicLinkName - interface's symbolic link. - + Return Value: BthHfpDevice pointer or NULL. @@ -3032,17 +3032,17 @@ Return Value: { PAGED_CODE(); DPF_ENTER(("[CAdapterCommon::BthHfpDeviceFind]")); - + PLIST_ENTRY le = NULL; BthHfpDevice * bthDevice = NULL; ExAcquireFastMutex(&m_BthHfpFastMutex); - + for (le = m_BthHfpDevices.Flink; le != &m_BthHfpDevices; le = le->Flink) { BthHfpDevice * tmpBthDevice = BthHfpDevice::GetBthHfpDevice(le); ASSERT(tmpBthDevice != NULL); - + PUNICODE_STRING unicodeStr = tmpBthDevice->GetSymbolicLinkName(); ASSERT(unicodeStr != NULL); @@ -3055,7 +3055,7 @@ Return Value: break; } } - + ExReleaseFastMutex(&m_BthHfpFastMutex); return bthDevice; @@ -3077,7 +3077,7 @@ Routine Description: Arguments: SymbolicLinkName - new interface's symbolic link. - + Return Value: NT status code. @@ -3090,7 +3090,7 @@ Return Value: NTSTATUS ntStatus = STATUS_SUCCESS; BthHfpDevice * bthDevice = NULL; BthHfpWorkTask * bthWorkTask = NULL; - + DPF(D_VERBOSE, ("BthHfpScoInterfaceArrival: SymbolicLinkName %wZ", SymbolicLinkName)); // @@ -3106,7 +3106,7 @@ Return Value: ntStatus = STATUS_SUCCESS; goto Done; } - + // // Alloc a new structure for this Bluetooth hands-free device. // @@ -3117,9 +3117,9 @@ Return Value: ntStatus = STATUS_INSUFFICIENT_RESOURCES; goto Done; } - + DPF(D_VERBOSE, ("BthHfpScoInterfaceArrival: created BthHfpDevice 0x%p ", bthDevice)); - + // // Basic initialization of the Bluetooth Hands-Free Profile interface. // The audio miniport creation is done later by the BthHfpDevice.Start() @@ -3139,7 +3139,7 @@ Return Value: ntStatus = STATUS_INSUFFICIENT_RESOURCES; goto Done; } - + // bthWorkTask->L.Size is set to sizeof(BthHfpWorkTask) in the Look Aside List configuration #pragma warning(suppress: 6386) RtlZeroMemory(bthWorkTask, sizeof(*bthWorkTask)); @@ -3147,9 +3147,9 @@ Return Value: InitializeListHead(&bthWorkTask->ListEntry); // Note that bthDevice has one reference at this point. bthWorkTask->Device = bthDevice; - + ExAcquireFastMutex(&m_BthHfpFastMutex); - + // // Insert this new Bluetooth HFP device in our list. // @@ -3165,13 +3165,13 @@ Return Value: // Schedule a work-item if not already running. // WdfWorkItemEnqueue(m_BthHfpWorkItem); - + ExReleaseFastMutex(&m_BthHfpFastMutex); Done: if (!NT_SUCCESS(ntStatus)) { - // Release the last ref, this will delete the BthHfpDevice + // Release the last ref, this will delete the BthHfpDevice SAFE_RELEASE(bthDevice); if (bthWorkTask != NULL) @@ -3180,7 +3180,7 @@ Done: bthWorkTask = NULL; } } - + return ntStatus; } @@ -3200,7 +3200,7 @@ Routine Description: Arguments: SymbolicLinkName - interface's symbolic link to remove. - + Return Value: NT status code. @@ -3213,7 +3213,7 @@ Return Value: NTSTATUS ntStatus = STATUS_SUCCESS; BthHfpDevice * bthDevice = NULL; BthHfpWorkTask * bthWorkTask = NULL; - + DPF(D_VERBOSE, ("BthHfpScoInterfaceRemoval: SymbolicLinkName %wZ", SymbolicLinkName)); // @@ -3227,7 +3227,7 @@ Return Value: ntStatus = STATUS_SUCCESS; goto Done; } - + // // Init a work task. // @@ -3238,7 +3238,7 @@ Return Value: ntStatus = STATUS_INSUFFICIENT_RESOURCES; goto Done; } - + // bthWorkTask->L.Size is set to sizeof(BthHfpWorkTask) in the Look Aside List configuration #pragma warning(suppress: 6386) RtlZeroMemory(bthWorkTask, sizeof(*bthWorkTask)); @@ -3248,7 +3248,7 @@ Return Value: bthWorkTask->Device = bthDevice; ExAcquireFastMutex(&m_BthHfpFastMutex); - + // // Remove this Bluetooth device from our list and release the associated reference. // @@ -3265,7 +3265,7 @@ Return Value: // Schedule a work-item if not already running. // WdfWorkItemEnqueue(m_BthHfpWorkItem); - + ExReleaseFastMutex(&m_BthHfpFastMutex); // @@ -3280,7 +3280,7 @@ Done: // Release the ref we got in find. SAFE_RELEASE(bthDevice); } - + return ntStatus; } @@ -3298,9 +3298,9 @@ Routine Description: This callback is invoked when a new HFP SCO Bypass interface is added or removed. Arguments: - NotificationPointer - Interface change notification + NotificationPointer - Interface change notification Context - CAdapterCommon ptr. - + Return Value: NT status code. @@ -3309,32 +3309,32 @@ Return Value: { PAGED_CODE(); DPF_ENTER(("[EvtBthHfpScoBypassInterfaceChange]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; CAdapterCommon * This = NULL; PDEVICE_INTERFACE_CHANGE_NOTIFICATION Notification = (PDEVICE_INTERFACE_CHANGE_NOTIFICATION) NotificationPointer; - + // // Make sure this is the interface class we extect. Any other class guid // is an error, but let it go since it is not fatal to the machine. // - if (!IsEqualGUID(Notification->InterfaceClassGuid, GUID_DEVINTERFACE_BLUETOOTH_HFP_SCO_HCIBYPASS)) + if (!IsEqualGUID(Notification->InterfaceClassGuid, GUID_DEVINTERFACE_BLUETOOTH_HFP_SCO_HCIBYPASS)) { DPF(D_VERBOSE, ("EvtBthHfpScoBypassInterfaceChange: bad interface ClassGuid")); ASSERTMSG("EvtBthHfpScoBypassInterfaceChange: bad interface ClassGuid ", FALSE); - + goto Done; } This = (CAdapterCommon *)Context; ASSERT(This != NULL); _Analysis_assume_(This != NULL); - + // - // Take action based on the event. Any other event type is an error, + // Take action based on the event. Any other event type is an error, // but let it go since it is not fatal to the machine. // - if (IsEqualGUID(Notification->Event, GUID_DEVICE_INTERFACE_ARRIVAL)) + if (IsEqualGUID(Notification->Event, GUID_DEVICE_INTERFACE_ARRIVAL)) { ntStatus = This->BthHfpScoInterfaceArrival(Notification->SymbolicLinkName); } @@ -3342,13 +3342,13 @@ Return Value: { ntStatus = This->BthHfpScoInterfaceRemoval(Notification->SymbolicLinkName); } - else + else { DPF(D_VERBOSE, ("EvtBthHfpScoBypassInterfaceChange: bad " "GUID_DEVINTERFACE_BLUETOOTH_HFP_SCO_HCIBYPASS event")); ASSERTMSG("EvtBthHfpScoBypassInterfaceChange: bad " "GUID_DEVINTERFACE_BLUETOOTH_HFP_SCO_HCIBYPASS event ", FALSE); - + goto Done; } @@ -3379,7 +3379,7 @@ Return Value: WDF_WORKITEM_CONFIG wiConfig; WDF_OBJECT_ATTRIBUTES attributes; BthHfpWorkItemContext * wiContext; - + // // Init spin-lock, linked lists, work-item, event, etc. // Init all members to default values. This basic init should not fail. @@ -3396,7 +3396,7 @@ Return Value: POOL_NX_ALLOCATION, m_BhtHfpWorkTaskPoolElementSize, MINADAPTER_POOLTAG, - 0); + 0); // // Enable Bluetooth HFP SCO-Bypass Cleanup. // Do any allocation/initialization that can fail after this point. @@ -3421,7 +3421,7 @@ Return Value: wiContext = GetBthHfpWorkItemContext(m_BthHfpWorkItem); wiContext->Adapter = this; // weak ref. - + // // Register for bluetooth heandsfree profile interface changes. // @@ -3470,7 +3470,7 @@ Routine Description: { return; } - + // // Unregister for bluetooth heandsfree profile interface changes. // @@ -3489,20 +3489,20 @@ Routine Description: WdfObjectDelete(m_BthHfpWorkItem); m_BthHfpWorkItem = NULL; } - + ASSERT(IsListEmpty(&m_BthHfpWorkTasks)); - + // - // Stop and delete all BthHfpDevices. We are the only thread accessing this list, + // Stop and delete all BthHfpDevices. We are the only thread accessing this list, // so there is no need to acquire the mutex. // while (!IsListEmpty(&m_BthHfpDevices)) { BthHfpDevice * bthDevice = NULL; PLIST_ENTRY le = NULL; - + le = RemoveHeadList(&m_BthHfpDevices); - + bthDevice = BthHfpDevice::GetBthHfpDevice(le); InitializeListHead(le); @@ -3512,9 +3512,9 @@ Routine Description: // This should be the last reference. bthDevice->Release(); } - + ASSERT(IsListEmpty(&m_BthHfpDevices)); - + // // General cleanup. // @@ -3531,9 +3531,9 @@ Routine Description: #pragma code_seg("PAGE") STDMETHODIMP BthHfpDevice::NonDelegatingQueryInterface -( +( _In_ REFIID Interface, - _COM_Outptr_ PVOID * Object + _COM_Outptr_ PVOID * Object ) /*++ @@ -3543,7 +3543,7 @@ Routine Description: Arguments: - Interface - + Interface - Object - @@ -3580,7 +3580,7 @@ Return Value: } // NonDelegatingQueryInterface //============================================================================= -// Dummy stubs to override the default WDF behavior of closing the target +// Dummy stubs to override the default WDF behavior of closing the target // on query remove. This driver closes and deletes the supporting objects // when the target removes the BTH HFP SCO Bypass interface. // @@ -3588,13 +3588,13 @@ Return Value: #pragma code_seg("PAGE") NTSTATUS BthHfpDevice::EvtBthHfpTargetQueryRemove -( +( _In_ WDFIOTARGET IoTarget ) { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::EvtBthHfpTargetQueryRemove]")); - + UNREFERENCED_PARAMETER(IoTarget); return STATUS_SUCCESS; } @@ -3602,25 +3602,25 @@ BthHfpDevice::EvtBthHfpTargetQueryRemove #pragma code_seg("PAGE") VOID BthHfpDevice::EvtBthHfpTargetRemoveCanceled -( +( _In_ WDFIOTARGET IoTarget ) { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::EvtBthHfpTargetRemoveCanceled]")); - + UNREFERENCED_PARAMETER(IoTarget); } #pragma code_seg("PAGE") VOID BthHfpDevice::EvtBthHfpTargetRemoveComplete -( +( _In_ WDFIOTARGET IoTarget ) { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::EvtBthHfpTargetRemoveComplete]")); - + UNREFERENCED_PARAMETER(IoTarget); } @@ -3629,7 +3629,7 @@ BthHfpDevice::EvtBthHfpTargetRemoveComplete NTSTATUS BthHfpDevice::Init ( - _In_ CAdapterCommon * Adapter, + _In_ CAdapterCommon * Adapter, _In_ PUNICODE_STRING SymbolicLinkName ) { @@ -3644,7 +3644,7 @@ BthHfpDevice::Init WDF_WORKITEM_CONFIG wiConfig; AddRef(); // first ref. - + // // Basic init of all the class' members. // @@ -3662,13 +3662,13 @@ BthHfpDevice::Init m_Descriptor = NULL; m_VolumePropValues = NULL; - // Notification updates. + // Notification updates. m_SpeakerVolumeLevel = 0; m_MicVolumeLevel = 0; m_ConnectionStatusLong = FALSE; m_StreamStatusLong = STATUS_INVALID_DEVICE_STATE; // Sco stream is not open. m_NRECDisableStatusLong = FALSE; - + m_StreamReq = NULL; m_SpeakerVolumeReq = NULL; m_MicVolumeReq = NULL; @@ -3677,21 +3677,21 @@ BthHfpDevice::Init m_WorkItem = NULL; m_ReqCollection = NULL; - + m_nStreams = 0; KeInitializeEvent(&m_StreamStatusEvent, NotificationEvent, TRUE); InitializeListHead(&m_ListEntry); KeInitializeSpinLock(&m_Lock); - + RtlZeroMemory(&m_SymbolicLinkName, sizeof(m_SymbolicLinkName)); - + RtlZeroMemory(&m_SpeakerVolumeCallback, sizeof(m_SpeakerVolumeCallback)); RtlZeroMemory(&m_SpeakerConnectionStatusCallback, sizeof(m_SpeakerConnectionStatusCallback)); RtlZeroMemory(&m_MicVolumeCallback, sizeof(m_MicVolumeCallback)); RtlZeroMemory(&m_MicConnectionStatusCallback, sizeof(m_MicConnectionStatusCallback)); - + // // Allocate a notification WDF work-item. // @@ -3719,12 +3719,12 @@ BthHfpDevice::Init ntStatus = WdfCollectionCreate( &attributes, &m_ReqCollection); - + IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("Init: WdfCollectionCreate failed: 0x%x", ntStatus)), Done); - + // // Open the target interface. // @@ -3741,18 +3741,18 @@ BthHfpDevice::Init WDF_IO_TARGET_OPEN_PARAMS_INIT_OPEN_BY_NAME( &openParams, SymbolicLinkName, - STANDARD_RIGHTS_ALL); - + STANDARD_RIGHTS_ALL); + openParams.EvtIoTargetQueryRemove = EvtBthHfpTargetQueryRemove; openParams.EvtIoTargetRemoveCanceled = EvtBthHfpTargetRemoveCanceled; openParams.EvtIoTargetRemoveComplete = EvtBthHfpTargetRemoveComplete; - + ntStatus = WdfIoTargetOpen(m_WdfIoTarget, &openParams); IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("Init: WdfIoTargetOpen(%wZ) failed: 0x%x", SymbolicLinkName, ntStatus)), Done); - + // // Make a copy of the symbolic link name. // @@ -3765,20 +3765,20 @@ BthHfpDevice::Init { ntStatus = STATUS_INSUFFICIENT_RESOURCES; } - + IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("Init: ExAllocatePoolWithTag failed, out of memory")), Done); - + RtlCopyUnicodeString(&m_SymbolicLinkName, SymbolicLinkName); // // Allocate the WDF requests for status notifications. // - + // - // IOCTL_BTHHFP_DEVICE_GET_NRECDISABLE_STATUS_UPDATE + // IOCTL_BTHHFP_DEVICE_GET_NRECDISABLE_STATUS_UPDATE // WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&attributes, BthHfpDeviceNotificationReqContext); attributes.ParentObject = m_Adapter->GetWdfDevice(); @@ -3794,7 +3794,7 @@ BthHfpDevice::Init // Init context. reqCtx = GetBthHfpDeviceNotificationReqContext(m_NRECDisableStatusReq); reqCtx->BthHfpDevice = this; // weak ref. - + ntStatus = WdfMemoryCreatePreallocated( WDF_NO_OBJECT_ATTRIBUTES, &reqCtx->Buffer, @@ -3804,7 +3804,7 @@ BthHfpDevice::Init ntStatus, DPF(D_ERROR, ("Init: WdfMemoryCreatePreallocated failed, 0x%x", ntStatus)), Done); - + ntStatus = WdfMemoryCreatePreallocated( WDF_NO_OBJECT_ATTRIBUTES, &reqCtx->Buffer, @@ -3814,9 +3814,9 @@ BthHfpDevice::Init ntStatus, DPF(D_ERROR, ("Init: WdfMemoryCreatePreallocated failed, 0x%x", ntStatus)), Done); - + // - // IOCTL_BTHHFP_SPEAKER_GET_VOLUME_STATUS_UPDATE + // IOCTL_BTHHFP_SPEAKER_GET_VOLUME_STATUS_UPDATE // WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&attributes, BthHfpDeviceNotificationReqContext); attributes.ParentObject = m_Adapter->GetWdfDevice(); @@ -3832,7 +3832,7 @@ BthHfpDevice::Init // Init context. reqCtx = GetBthHfpDeviceNotificationReqContext(m_SpeakerVolumeReq); reqCtx->BthHfpDevice = this; // weak ref. - + ntStatus = WdfMemoryCreatePreallocated( WDF_NO_OBJECT_ATTRIBUTES, &reqCtx->Buffer, @@ -3842,7 +3842,7 @@ BthHfpDevice::Init ntStatus, DPF(D_ERROR, ("Init: WdfMemoryCreatePreallocated failed, 0x%x", ntStatus)), Done); - + ntStatus = WdfMemoryCreatePreallocated( WDF_NO_OBJECT_ATTRIBUTES, &reqCtx->Buffer, @@ -3852,7 +3852,7 @@ BthHfpDevice::Init ntStatus, DPF(D_ERROR, ("Init: WdfMemoryCreatePreallocated failed, 0x%x", ntStatus)), Done); - + // // IOCTL_BTHHFP_MIC_GET_VOLUME_STATUS_UPDATE // @@ -3866,11 +3866,11 @@ BthHfpDevice::Init ntStatus, DPF(D_ERROR, ("Init: WdfRequestCreate(Mic-Volume) failed, 0x%x", ntStatus)), Done); - + // Init context. reqCtx = GetBthHfpDeviceNotificationReqContext(m_MicVolumeReq); reqCtx->BthHfpDevice = this; // weak ref. - + ntStatus = WdfMemoryCreatePreallocated( WDF_NO_OBJECT_ATTRIBUTES, &reqCtx->Buffer, @@ -3880,7 +3880,7 @@ BthHfpDevice::Init ntStatus, DPF(D_ERROR, ("Init: WdfMemoryCreatePreallocated failed, 0x%x", ntStatus)), Done); - + ntStatus = WdfMemoryCreatePreallocated( WDF_NO_OBJECT_ATTRIBUTES, &reqCtx->Buffer, @@ -3890,7 +3890,7 @@ BthHfpDevice::Init ntStatus, DPF(D_ERROR, ("Init: WdfMemoryCreatePreallocated failed, 0x%x", ntStatus)), Done); - + // // IOCTL_BTHHFP_DEVICE_GET_CONNECTION_STATUS_UPDATE // @@ -3904,11 +3904,11 @@ BthHfpDevice::Init ntStatus, DPF(D_ERROR, ("Init: WdfRequestCreate(Connection-Status) failed, 0x%x", ntStatus)), Done); - + // Init context. reqCtx = GetBthHfpDeviceNotificationReqContext(m_ConnectionReq); reqCtx->BthHfpDevice = this; // weak ref. - + ntStatus = WdfMemoryCreatePreallocated( WDF_NO_OBJECT_ATTRIBUTES, &reqCtx->Buffer, @@ -3918,7 +3918,7 @@ BthHfpDevice::Init ntStatus, DPF(D_ERROR, ("Init: WdfMemoryCreatePreallocated failed, 0x%x", ntStatus)), Done); - + ntStatus = WdfMemoryCreatePreallocated( WDF_NO_OBJECT_ATTRIBUTES, &reqCtx->Buffer, @@ -3928,7 +3928,7 @@ BthHfpDevice::Init ntStatus, DPF(D_ERROR, ("Init: WdfMemoryCreatePreallocated failed, 0x%x", ntStatus)), Done); - + // // IOCTL_BTHHFP_STREAM_GET_STATUS_UPDATE // @@ -3942,11 +3942,11 @@ BthHfpDevice::Init ntStatus, DPF(D_ERROR, ("Init: WdfRequestCreate(Stream-Status) failed, 0x%x", ntStatus)), Done); - + // Init context. reqCtx = GetBthHfpDeviceNotificationReqContext(m_StreamReq); reqCtx->BthHfpDevice = this; // weak ref. - + ntStatus = WdfMemoryCreatePreallocated( WDF_NO_OBJECT_ATTRIBUTES, &reqCtx->Buffer, @@ -3956,7 +3956,7 @@ BthHfpDevice::Init ntStatus, DPF(D_ERROR, ("Init: WdfMemoryCreatePreallocated failed, 0x%x", ntStatus)), Done); - + ntStatus = WdfMemoryCreatePreallocated( WDF_NO_OBJECT_ATTRIBUTES, &reqCtx->Buffer, @@ -3965,14 +3965,14 @@ BthHfpDevice::Init IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("Init: WdfMemoryCreatePreallocated failed, 0x%x", ntStatus)), - Done); - + Done); + // // This remote device is now in running state. No need to use interlock operations // b/c at this time this is the only thread accessing this info. // m_State = eBthHfpStateRunning; - + // // Init successful. // @@ -3985,8 +3985,8 @@ Done: //============================================================================= #pragma code_seg("PAGE") BthHfpDevice::~BthHfpDevice -( - void +( + void ) /*++ @@ -4007,7 +4007,7 @@ Return Value: ASSERT(m_State != eBthHfpStateRunning); ASSERT(IsListEmpty(&m_ListEntry)); - + // // Release ref to remote stack. // @@ -4058,7 +4058,7 @@ Return Value: WdfObjectDelete(ctx->MemIn); ctx->MemIn = NULL; } - + if (ctx->MemOut != NULL) { WdfObjectDelete(ctx->MemOut); @@ -4069,7 +4069,7 @@ Return Value: WdfObjectDelete(m_SpeakerVolumeReq); m_SpeakerVolumeReq = NULL; } - + if (m_MicVolumeReq != NULL) { BthHfpDeviceNotificationReqContext * ctx; @@ -4081,7 +4081,7 @@ Return Value: WdfObjectDelete(ctx->MemIn); ctx->MemIn = NULL; } - + if (ctx->MemOut != NULL) { WdfObjectDelete(ctx->MemOut); @@ -4092,7 +4092,7 @@ Return Value: WdfObjectDelete(m_MicVolumeReq); m_MicVolumeReq = NULL; } - + if (m_ConnectionReq != NULL) { BthHfpDeviceNotificationReqContext * ctx; @@ -4104,7 +4104,7 @@ Return Value: WdfObjectDelete(ctx->MemIn); ctx->MemIn = NULL; } - + if (ctx->MemOut != NULL) { WdfObjectDelete(ctx->MemOut); @@ -4115,7 +4115,7 @@ Return Value: WdfObjectDelete(m_ConnectionReq); m_ConnectionReq = NULL; } - + if (m_StreamReq != NULL) { BthHfpDeviceNotificationReqContext * ctx; @@ -4127,7 +4127,7 @@ Return Value: WdfObjectDelete(ctx->MemIn); ctx->MemIn = NULL; } - + if (ctx->MemOut != NULL) { WdfObjectDelete(ctx->MemOut); @@ -4159,13 +4159,13 @@ Return Value: ASSERT(m_UnknownSpeakerTopology == NULL); SAFE_RELEASE(m_UnknownSpeakerTopology); - + ASSERT(m_UnknownSpeakerWave == NULL); SAFE_RELEASE(m_UnknownSpeakerWave); - + ASSERT(m_UnknownMicTopology == NULL); SAFE_RELEASE(m_UnknownMicTopology); - + ASSERT(m_UnknownMicWave == NULL); SAFE_RELEASE(m_UnknownMicWave); @@ -4175,10 +4175,10 @@ Return Value: ASSERT(m_SpeakerConnectionStatusCallback.Handler == NULL); ASSERT(m_MicVolumeCallback.Handler == NULL); ASSERT(m_MicConnectionStatusCallback.Handler == NULL); -} // ~CAdapterCommon +} // ~CAdapterCommon // -// IBthHfpDeviceCommon implementation. +// IBthHfpDeviceCommon implementation. // //============================================================================= @@ -4188,7 +4188,7 @@ BthHfpDevice::IsVolumeSupported() { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::IsVolumeSupported]")); - + return m_Descriptor->SupportsVolume; } @@ -4197,16 +4197,16 @@ BthHfpDevice::IsVolumeSupported() PKSPROPERTY_VALUES BthHfpDevice::GetVolumeSettings ( - _Out_ PULONG Size + _Out_ PULONG Size ) { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::GetVolumeSettings]")); ASSERT(Size != NULL); - + *Size = m_Descriptor->VolumePropertyValuesSize; - + return m_VolumePropValues; } @@ -4217,7 +4217,7 @@ BthHfpDevice::GetSpeakerVolume() { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::GetSpeakerVolume]")); - + return InterlockedCompareExchange(&m_SpeakerVolumeLevel, 0, 0); } @@ -4231,7 +4231,7 @@ BthHfpDevice::SetSpeakerVolume { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::SetSpeakerVolume]")); - + return SetBthHfpSpeakerVolume(Volume); } @@ -4242,7 +4242,7 @@ BthHfpDevice::GetMicVolume() { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::GetMicVolume]")); - + return InterlockedCompareExchange(&m_MicVolumeLevel, 0, 0); } @@ -4256,7 +4256,7 @@ BthHfpDevice::SetMicVolume { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::SetMicVolume]")); - + return SetBthHfpMicVolume(Volume); } @@ -4267,7 +4267,7 @@ BthHfpDevice::GetConnectionStatus() { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::GetConnectionStatus]")); - + return (BOOL)InterlockedCompareExchange(&m_ConnectionStatusLong, 0, 0); } @@ -4281,6 +4281,7 @@ BthHfpDevice::GetBthHfpCodecId(_Out_ UCHAR * CodecId) ASSERT(CodecId != NULL); +#if !defined(NTDDI_WIN10_RS3) typedef enum _HFP_BYPASS_CODEC_ID_VERSION { REQ_HFP_BYPASS_CODEC_ID_V1 = 1, } HFP_BYPASS_CODEC_ID_VERSION, *PHFP_BYPASS_CODEC_ID_VERSION; @@ -4288,6 +4289,7 @@ BthHfpDevice::GetBthHfpCodecId(_Out_ UCHAR * CodecId) typedef struct _HFP_BYPASS_CODEC_ID_V1 { UCHAR CodecId; } HFP_BYPASS_CODEC_ID_V1, *PHFP_BYPASS_CODEC_ID_V1; +#endif NTSTATUS ntStatus = STATUS_SUCCESS; @@ -4333,7 +4335,7 @@ BthHfpDevice::Connect() { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::Connect]")); - + return SetBthHfpConnect(); } @@ -4344,7 +4346,7 @@ BthHfpDevice::Disconnect() { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::Disconnect]")); - + return SetBthHfpDisconnect(); } @@ -4374,12 +4376,12 @@ BthHfpDevice::StreamOpen() LONG nStreams = 0; ASSERT(m_nStreams >= 0); - + nStreams = InterlockedIncrement(&m_nStreams); if (nStreams == 1) { BOOLEAN streamOpen = FALSE; - + ntStatus = SetBthHfpStreamOpen(); if (NT_SUCCESS(ntStatus)) { @@ -4416,19 +4418,19 @@ BthHfpDevice::StreamClose() { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::StreamClose]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; LONG nStreams = 0; ASSERT(m_nStreams > 0); - + nStreams = InterlockedDecrement(&m_nStreams); if (nStreams == 0) { ntStatus = SetBthHfpStreamClose(); - + StopBthHfpStreamStatusNotification(); - + m_StreamStatus = STATUS_INVALID_DEVICE_STATE; } @@ -4442,7 +4444,7 @@ BthHfpDevice::GetContainerId() { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::GetContainerId]")); - + return m_Descriptor->ContainerId; } @@ -4459,7 +4461,7 @@ BthHfpDevice::SetSpeakerVolumeHandler DPF_ENTER(("[BthHfpDevice::SetSpeakerVolumeHandler]")); ASSERT(EventHandler == NULL || m_SpeakerVolumeCallback.Handler == NULL); - + m_SpeakerVolumeCallback.Handler = EventHandler; // weak ref. m_SpeakerVolumeCallback.Context = EventHandlerContext; } @@ -4475,9 +4477,9 @@ BthHfpDevice::SetSpeakerConnectionStatusHandler { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::SetSpeakerConnectionStatusHandler]")); - + ASSERT(EventHandler == NULL || m_SpeakerConnectionStatusCallback.Handler == NULL); - + m_SpeakerConnectionStatusCallback.Handler = EventHandler; // weak ref. m_SpeakerConnectionStatusCallback.Context = EventHandlerContext; } @@ -4493,9 +4495,9 @@ BthHfpDevice::SetMicVolumeHandler { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::SetMicVolumeHandler]")); - + ASSERT(EventHandler == NULL || m_MicVolumeCallback.Handler == NULL); - + m_MicVolumeCallback.Handler = EventHandler; // weak ref. m_MicVolumeCallback.Context = EventHandlerContext; } @@ -4511,9 +4513,9 @@ BthHfpDevice::SetMicConnectionStatusHandler { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::SetMicConnectionStatusHandler]")); - + ASSERT(EventHandler == NULL || m_MicConnectionStatusCallback.Handler == NULL); - + m_MicConnectionStatusCallback.Handler = EventHandler; // weak ref. m_MicConnectionStatusCallback.Context = EventHandlerContext; } @@ -4525,7 +4527,7 @@ BthHfpDevice::IsNRECSupported() { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::IsNRECSupported]")); - + return m_Descriptor->SupportsNREC; } @@ -4547,7 +4549,7 @@ BthHfpDevice::GetNRECDisableStatus() //============================================================================= #pragma code_seg() -NTSTATUS +NTSTATUS BthHfpDevice::SendIoCtrlAsynchronously ( _In_ WDFREQUEST Request, @@ -4567,7 +4569,7 @@ Routine Description: --*/ { DPF_ENTER(("[BthHfpDevice::SendIoCtrlAsynchronously]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; BOOLEAN fSent = FALSE; @@ -4601,7 +4603,7 @@ Routine Description: { ntStatus = STATUS_INVALID_DEVICE_STATE; } - + DPF(D_ERROR, ("SendIoCtrlAsynchronously: WdfRequestSend(0x%x) failed, 0x%x", IoControlCode, ntStatus)); goto Done; } @@ -4618,7 +4620,7 @@ Done: //============================================================================= #pragma code_seg("PAGE") -NTSTATUS +NTSTATUS BthHfpDevice::SendIoCtrlSynchronously ( _In_opt_ WDFREQUEST Request, @@ -4640,7 +4642,7 @@ Routine Description: { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::SendIoCtrlSynchronously]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; PWDF_MEMORY_DESCRIPTOR memInPtr = NULL; PWDF_MEMORY_DESCRIPTOR memOutPtr = NULL; @@ -4662,14 +4664,14 @@ Routine Description: WDF_MEMORY_DESCRIPTOR_INIT_BUFFER(&memOut, Buffer, OutLength); memOutPtr = &memOut; } - + WDF_REQUEST_SEND_OPTIONS_INIT( - &reqOpts, - WDF_REQUEST_SEND_OPTION_TIMEOUT | + &reqOpts, + WDF_REQUEST_SEND_OPTION_TIMEOUT | WDF_REQUEST_SEND_OPTION_SYNCHRONOUS); reqOpts.Timeout = WDF_REL_TIMEOUT_IN_SEC(BTH_HFP_SYNC_REQ_TIMEOUT_IN_SEC); - + ntStatus = WdfIoTargetSendIoctlSynchronously( m_WdfIoTarget, Request, @@ -4678,7 +4680,7 @@ Routine Description: memOutPtr, &reqOpts, NULL); // bytes returned. - + IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_VERBOSE, ("SendIoCtrlSynchronously: WdfIoTargetSendIoctlSynchronously(0x%x) failed, 0x%x", IoControlCode, ntStatus)), @@ -4705,7 +4707,7 @@ Routine Description: Arguments: WorkItem - WDF work-item object. - + --*/ { DPF_ENTER(("[BthHfpDevice::EvtBthHfpDeviceNotificationStatusWorkItem]")); @@ -4713,8 +4715,8 @@ Arguments: NTSTATUS ntStatus = STATUS_SUCCESS; BthHfpDevice * This; KIRQL oldIrql; - - if (WorkItem == NULL) + + if (WorkItem == NULL) { return; } @@ -4724,11 +4726,11 @@ Arguments: for (;;) { - BOOL resend = TRUE; + BOOL resend = TRUE; WDFREQUEST req = NULL; BthHfpDeviceNotificationReqContext * reqCtx; WDF_REQUEST_COMPLETION_PARAMS params; - + // // Retrieve a task. // @@ -4750,10 +4752,10 @@ Arguments: // WDF_REQUEST_COMPLETION_PARAMS_INIT(¶ms); WdfRequestGetCompletionParams(req, ¶ms); - + reqCtx = GetBthHfpDeviceNotificationReqContext(req); ASSERT(reqCtx != NULL); - + // // Handle this notification. // @@ -4766,7 +4768,7 @@ Arguments: InterlockedExchange(&This->m_NRECDisableStatusLong, (LONG)reqCtx->Buffer.BoolStatus); } break; - + case IOCTL_BTHHFP_SPEAKER_GET_VOLUME_STATUS_UPDATE: { LONG oldVolume; @@ -4783,7 +4785,7 @@ Arguments: } } break; - + case IOCTL_BTHHFP_MIC_GET_VOLUME_STATUS_UPDATE: { LONG oldVolume; @@ -4814,7 +4816,7 @@ Arguments: This->m_SpeakerConnectionStatusCallback.Handler( This->m_SpeakerConnectionStatusCallback.Context); } - + if (This->m_MicConnectionStatusCallback.Handler != NULL) { This->m_MicConnectionStatusCallback.Handler( @@ -4827,7 +4829,7 @@ Arguments: default: // This should never happen. resend = FALSE; - DPF(D_ERROR, ("EvtBthHfpDeviceNotificationStatusWorkItem: invalid request ctrl 0x%x", + DPF(D_ERROR, ("EvtBthHfpDeviceNotificationStatusWorkItem: invalid request ctrl 0x%x", params.Parameters.Ioctl.IoControlCode)); break; } @@ -4836,19 +4838,19 @@ Arguments: if (resend) { WDF_REQUEST_REUSE_PARAMS reuseParams; - + WDF_REQUEST_REUSE_PARAMS_INIT( - &reuseParams, + &reuseParams, WDF_REQUEST_REUSE_NO_FLAGS, STATUS_SUCCESS); - + ntStatus = WdfRequestReuse(req, &reuseParams); if (!NT_SUCCESS(ntStatus)) { DPF(D_ERROR, ("EvtBthHfpDeviceNotificationStatusWorkItem: WdfRequestReuse failed, 0x%x", ntStatus)); break; } - + // Resend status notification request. reqCtx->Buffer.bImmediate = FALSE; @@ -4859,11 +4861,11 @@ Arguments: reqCtx->MemOut, EvtBthHfpDeviceNotificationStatusCompletion, This); - + if (!NT_SUCCESS(ntStatus)) { DPF(D_ERROR, ("EvtBthHfpDeviceNotificationStatusWorkItem: SendIoCtrlAsynchronously" - "(0x%x) failed, 0x%x", + "(0x%x) failed, 0x%x", params.Parameters.Ioctl.IoControlCode, ntStatus)); break; } @@ -4873,7 +4875,7 @@ Arguments: //============================================================================= #pragma code_seg() -void +void BthHfpDevice::EvtBthHfpDeviceNotificationStatusCompletion ( _In_ WDFREQUEST Request, @@ -4883,15 +4885,15 @@ BthHfpDevice::EvtBthHfpDeviceNotificationStatusCompletion ) { DPF_ENTER(("[BthHfpDevice::EvtBthHfpDeviceNotificationStatusCompletion]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; BthHfpDeviceNotificationReqContext * ctx = NULL; BthHfpDevice * This = NULL; KIRQL oldIrql; - + UNREFERENCED_PARAMETER(Target); UNREFERENCED_PARAMETER(Context); - + ctx = GetBthHfpDeviceNotificationReqContext(Request); This = ctx->BthHfpDevice; ASSERT(This != NULL); @@ -4920,7 +4922,7 @@ BthHfpDevice::EvtBthHfpDeviceNotificationStatusCompletion ctx->Errors = 0; } - // + // // Let the work-item thread process this request. // KeAcquireSpinLock(&This->m_Lock, &oldIrql); @@ -4938,7 +4940,7 @@ Done:; //============================================================================= #pragma code_seg("PAGE") -NTSTATUS +NTSTATUS BthHfpDevice::GetBthHfpDescriptor ( _Out_ PBTHHFP_DESCRIPTOR2 * Descriptor @@ -4954,15 +4956,15 @@ Routine Description: { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::GetBthHfpDescriptor]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; WDFREQUEST req = NULL; PBTHHFP_DESCRIPTOR2 descriptor = NULL; ULONG length = 0; ULONG_PTR information = 0; - WDF_REQUEST_REUSE_PARAMS reuseParams; + WDF_REQUEST_REUSE_PARAMS reuseParams; WDF_OBJECT_ATTRIBUTES attributes; - + *Descriptor = NULL; // @@ -4988,30 +4990,30 @@ Routine Description: NULL, NULL, NULL); - + if (ntStatus != STATUS_BUFFER_TOO_SMALL) { if (NT_SUCCESS(ntStatus)) { ntStatus = STATUS_INVALID_DEVICE_STATE; } - + DPF(D_ERROR, ("GetBthHfpDescriptor: SendIoCtrlSynchronously(IOCTL_BTHHFP_DEVICE_GET_DESCRIPTOR2): failed, 0x%x", ntStatus)); goto Done; } - + ntStatus = STATUS_SUCCESS; information = WdfRequestGetInformation(req); if (information == 0 || information > ULONG_MAX) { - ntStatus = STATUS_INVALID_DEVICE_STATE; + ntStatus = STATUS_INVALID_DEVICE_STATE; DPF(D_ERROR, ("GetBthHfpDescriptor: IOCTL_BTHHFP_DEVICE_GET_DESCRIPTOR2 buffer too big (%Id): 0x%x", information, ntStatus)); goto Done; } length = (ULONG)information; - + // // Allocate memory needed to hold the info. // @@ -5029,16 +5031,16 @@ Routine Description: // Get the Bth HFP SCO Bypass descriptor. // WDF_REQUEST_REUSE_PARAMS_INIT( - &reuseParams, + &reuseParams, WDF_REQUEST_REUSE_NO_FLAGS, STATUS_SUCCESS); - + ntStatus = WdfRequestReuse(req, &reuseParams); IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("GetBthHfpDescriptor: WdfRequestReuse failed, 0x%x", ntStatus)), Done); - + ntStatus = SendIoCtrlSynchronously( req, IOCTL_BTHHFP_DEVICE_GET_DESCRIPTOR2, @@ -5055,14 +5057,14 @@ Routine Description: // *Descriptor = descriptor; ntStatus = STATUS_SUCCESS; - + Done: if (!NT_SUCCESS(ntStatus)) { if (descriptor != NULL) { ExFreePoolWithTag(descriptor, MINADAPTER_POOLTAG); - } + } } if (req != NULL) @@ -5070,25 +5072,25 @@ Done: WdfObjectDelete(req); req = NULL; } - + return ntStatus; } //============================================================================= #pragma code_seg() -NTSTATUS +NTSTATUS BthHfpDevice::EnableBthHfpNrecDisableStatusNotification() /*++ Routine Description: - This function registers for Bluetooth Hands-Free Profile SCO Bypass NREC-Disable - status change notification. + This function registers for Bluetooth Hands-Free Profile SCO Bypass NREC-Disable + status change notification. --*/ { DPF_ENTER(("[BthHfpDevice::EnableBthHfpNrecDisableStatusNotification]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; BthHfpDeviceNotificationReqContext * ctx = NULL; @@ -5097,8 +5099,8 @@ Routine Description: // // This is a notification request. // - ctx->Buffer.bImmediate = FALSE; - + ctx->Buffer.bImmediate = FALSE; + // // Get the Bth HFP SCO Bypass NREC-Disable status (async). // @@ -5109,7 +5111,7 @@ Routine Description: ctx->MemOut, EvtBthHfpDeviceNotificationStatusCompletion, this); - + IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("EnableBthHfpNrecDisableStatusNotification: SendIoCtrlAsynchronously(IOCTL_BTHHFP_DEVICE_GET_NRECDISABLE_STATUS_UPDATE) failed, 0x%x", ntStatus)), @@ -5119,7 +5121,7 @@ Routine Description: // All done. // ntStatus = STATUS_SUCCESS; - + Done: return ntStatus; @@ -5127,7 +5129,7 @@ Done: //============================================================================= #pragma code_seg("PAGE") -NTSTATUS +NTSTATUS BthHfpDevice::GetBthHfpVolumePropertyValues ( _In_ ULONG Length, @@ -5144,10 +5146,10 @@ Routine Description: { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::GetBthHfpVolumePropertyValues]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; PKSPROPERTY_VALUES propValues = NULL; - + *PropValues = NULL; // @@ -5168,11 +5170,11 @@ Routine Description: // ntStatus = SendIoCtrlSynchronously( NULL, - IOCTL_BTHHFP_DEVICE_GET_VOLUMEPROPERTYVALUES, - 0, - Length, + IOCTL_BTHHFP_DEVICE_GET_VOLUMEPROPERTYVALUES, + 0, + Length, propValues); - + IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("GetBthHfpVolumePropertyValues: SendIoCtrlSynchronously(IOCTL_BTHHFP_DEVICE_GET_VOLUMEPROPERTYVALUES) failed, 0x%x", ntStatus)), @@ -5183,25 +5185,25 @@ Routine Description: // *PropValues = propValues; ntStatus = STATUS_SUCCESS; - + Done: if (!NT_SUCCESS(ntStatus)) { if (propValues != NULL) { ExFreePoolWithTag(propValues, MINADAPTER_POOLTAG); - } + } } - + return ntStatus; } //============================================================================= #pragma code_seg("PAGE") -NTSTATUS +NTSTATUS BthHfpDevice::SetBthHfpSpeakerVolume ( - _In_ LONG Volume + _In_ LONG Volume ) /*++ @@ -5214,9 +5216,9 @@ Routine Description: { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::SetBthHfpSpeakerVolume]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; - + // // Get the Bth HFP SCO Bypass speaker volume. // @@ -5226,7 +5228,7 @@ Routine Description: sizeof(Volume), 0, &Volume); - + IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("SetBthHfpSpeakerVolume: SendIoCtrlSynchronously(IOCTL_BTHHFP_SPEAKER_SET_VOLUME) failed, 0x%x", ntStatus)), @@ -5236,7 +5238,7 @@ Routine Description: // All done. // ntStatus = STATUS_SUCCESS; - + Done: return ntStatus; @@ -5244,10 +5246,10 @@ Done: //============================================================================= #pragma code_seg("PAGE") -NTSTATUS +NTSTATUS BthHfpDevice::GetBthHfpSpeakerVolume ( - _Out_ LONG * Volume + _Out_ LONG * Volume ) /*++ @@ -5260,14 +5262,14 @@ Routine Description: { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::GetBthHfpSpeakerVolume]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; BthHfpDeviceNotificationBuffer buffer = {0}; *Volume = 0; - + buffer.bImmediate = TRUE; - + // // Get the Bth HFP SCO Bypass speaker volume. // @@ -5277,7 +5279,7 @@ Routine Description: sizeof(buffer.bImmediate), sizeof(buffer.Volume), &buffer); - + IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("GetBthHfpSpeakerVolume: SendIoCtrlSynchronously(IOCTL_BTHHFP_SPEAKER_GET_VOLUME_STATUS_UPDATE) failed, 0x%x", ntStatus)), @@ -5288,7 +5290,7 @@ Routine Description: // *Volume = buffer.Volume; ntStatus = STATUS_SUCCESS; - + Done: return ntStatus; @@ -5296,19 +5298,19 @@ Done: //============================================================================= #pragma code_seg() -NTSTATUS +NTSTATUS BthHfpDevice::EnableBthHfpSpeakerVolumeStatusNotification() /*++ Routine Description: - This function registers for Bluetooth Hands-Free Profile SCO Bypass speaker - volume change notification. + This function registers for Bluetooth Hands-Free Profile SCO Bypass speaker + volume change notification. --*/ { DPF_ENTER(("[BthHfpDevice::EnableBthHfpSpeakerVolumeStatusNotification]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; BthHfpDeviceNotificationReqContext * ctx = NULL; @@ -5317,8 +5319,8 @@ Routine Description: // // This is a notification request. // - ctx->Buffer.bImmediate = FALSE; - + ctx->Buffer.bImmediate = FALSE; + // // Register for speaker volume updates. // @@ -5329,7 +5331,7 @@ Routine Description: ctx->MemOut, EvtBthHfpDeviceNotificationStatusCompletion, this); - + IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("EnableBthHfpSpeakerVolumeStatusNotification: SendIoCtrlAsynchronously(IOCTL_BTHHFP_SPEAKER_GET_VOLUME_STATUS_UPDATE) failed, 0x%x", ntStatus)), @@ -5339,7 +5341,7 @@ Routine Description: // All done. // ntStatus = STATUS_SUCCESS; - + Done: return ntStatus; @@ -5347,10 +5349,10 @@ Done: //============================================================================= #pragma code_seg("PAGE") -NTSTATUS +NTSTATUS BthHfpDevice::SetBthHfpMicVolume ( - _In_ LONG Volume + _In_ LONG Volume ) /*++ @@ -5363,9 +5365,9 @@ Routine Description: { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::SetBthHfpMicVolume]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; - + // // Get the Bth HFP SCO Bypass mic volume. // @@ -5375,7 +5377,7 @@ Routine Description: sizeof(Volume), 0, &Volume); - + IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("SetBthHfpMicVolume: SendIoCtrlSynchronously(IOCTL_BTHHFP_MIC_SET_VOLUME) failed, 0x%x", ntStatus)), @@ -5385,7 +5387,7 @@ Routine Description: // All done. // ntStatus = STATUS_SUCCESS; - + Done: return ntStatus; @@ -5393,10 +5395,10 @@ Done: //============================================================================= #pragma code_seg("PAGE") -NTSTATUS +NTSTATUS BthHfpDevice::GetBthHfpMicVolume ( - _Out_ LONG * Volume + _Out_ LONG * Volume ) /*++ @@ -5409,14 +5411,14 @@ Routine Description: { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::GetBthHfpMicVolume]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; BthHfpDeviceNotificationBuffer buffer = {0}; - + *Volume = 0; - + buffer.bImmediate = TRUE; - + // // Get the Bth HFP SCO Bypass mic volume. // @@ -5426,7 +5428,7 @@ Routine Description: sizeof(buffer.bImmediate), sizeof(buffer.Volume), &buffer); - + IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("GetBthHfpMicVolume: SendIoCtrlSynchronously(IOCTL_BTHHFP_MIC_GET_VOLUME_STATUS_UPDATE) failed, 0x%x", ntStatus)), @@ -5437,7 +5439,7 @@ Routine Description: // *Volume = buffer.Volume; ntStatus = STATUS_SUCCESS; - + Done: return ntStatus; @@ -5445,29 +5447,29 @@ Done: //============================================================================= #pragma code_seg() -NTSTATUS +NTSTATUS BthHfpDevice::EnableBthHfpMicVolumeStatusNotification() /*++ Routine Description: - This function registers for Bluetooth Hands-Free Profile SCO Bypass mic - volume change notification. + This function registers for Bluetooth Hands-Free Profile SCO Bypass mic + volume change notification. --*/ { DPF_ENTER(("[BthHfpDevice::EnableBthHfpMicVolumeStatusNotification]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; BthHfpDeviceNotificationReqContext * ctx = NULL; ctx = GetBthHfpDeviceNotificationReqContext(m_MicVolumeReq); - + // // This is a notification request. // - ctx->Buffer.bImmediate = FALSE; - + ctx->Buffer.bImmediate = FALSE; + // // Register for mic volume updates. // @@ -5478,7 +5480,7 @@ Routine Description: ctx->MemOut, EvtBthHfpDeviceNotificationStatusCompletion, this); - + IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("EnableBthHfpMicVolumeStatusNotification: SendIoCtrlAsynchronously(IOCTL_BTHHFP_MIC_GET_VOLUME_STATUS_UPDATE) failed, 0x%x", ntStatus)), @@ -5488,7 +5490,7 @@ Routine Description: // All done. // ntStatus = STATUS_SUCCESS; - + Done: return ntStatus; @@ -5496,10 +5498,10 @@ Done: //============================================================================= #pragma code_seg("PAGE") -NTSTATUS +NTSTATUS BthHfpDevice::GetBthHfpConnectionStatus ( - _Out_ BOOL * ConnectionStatus + _Out_ BOOL * ConnectionStatus ) /*++ @@ -5512,12 +5514,12 @@ Routine Description: { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::GetBthHfpConnectionStatus]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; BOOL bValue = TRUE; // In: bImmediate, Out: value. - + *ConnectionStatus = 0; - + // // Get the Bth HFP SCO Bypass connection status. // @@ -5527,7 +5529,7 @@ Routine Description: sizeof(bValue), sizeof(bValue), &bValue); - + IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("GetBthHfpConnectionStatus: SendIoCtrlSynchronously(IOCTL_BTHHFP_DEVICE_GET_CONNECTION_STATUS_UPDATE) failed, 0x%x", ntStatus)), @@ -5538,7 +5540,7 @@ Routine Description: // *ConnectionStatus = bValue; ntStatus = STATUS_SUCCESS; - + Done: return ntStatus; @@ -5546,29 +5548,29 @@ Done: //============================================================================= #pragma code_seg() -NTSTATUS +NTSTATUS BthHfpDevice::EnableBthHfpConnectionStatusNotification() /*++ Routine Description: - This function registers for Bluetooth Hands-Free Profile SCO Bypass - connection status notification. + This function registers for Bluetooth Hands-Free Profile SCO Bypass + connection status notification. --*/ { DPF_ENTER(("[BthHfpDevice::EnableBthHfpConnectionStatusNotification]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; BthHfpDeviceNotificationReqContext * ctx = NULL; ctx = GetBthHfpDeviceNotificationReqContext(m_ConnectionReq); - + // // Make sure this obj is alive while the IRP is active. // - ctx->Buffer.bImmediate = FALSE; - + ctx->Buffer.bImmediate = FALSE; + // // Get the Bth HFP SCO Bypass connection status. // @@ -5579,7 +5581,7 @@ Routine Description: ctx->MemOut, EvtBthHfpDeviceNotificationStatusCompletion, this); - + IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("EnableBthHfpConnectionStatusNotification: SendIoCtrlAsynchronously(IOCTL_BTHHFP_DEVICE_GET_CONNECTION_STATUS_UPDATE) failed, 0x%x", ntStatus)), @@ -5589,7 +5591,7 @@ Routine Description: // All done. // ntStatus = STATUS_SUCCESS; - + Done: return ntStatus; @@ -5597,7 +5599,7 @@ Done: //============================================================================= #pragma code_seg("PAGE") -NTSTATUS +NTSTATUS BthHfpDevice::SetBthHfpConnect() /*++ @@ -5605,18 +5607,18 @@ Routine Description: This function synchronously requests a Bluetooth Hands-Free Profile level connection to the paired Bluetooth device. - - This request initiates the Service Level Connection establishment procedure - and completes without waiting for the connection procedure to complete. + + This request initiates the Service Level Connection establishment procedure + and completes without waiting for the connection procedure to complete. Connection status can be determined using IOCTL_BTHHFP_GET_CONNECTION_STATUS_UPDATE. --*/ { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::SetBthHfpConnect]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; - + ntStatus = SendIoCtrlSynchronously( NULL, IOCTL_BTHHFP_DEVICE_REQUEST_CONNECT, @@ -5633,7 +5635,7 @@ Routine Description: // All done. // ntStatus = STATUS_SUCCESS; - + Done: return ntStatus; @@ -5641,7 +5643,7 @@ Done: //============================================================================= #pragma code_seg("PAGE") -NTSTATUS +NTSTATUS BthHfpDevice::SetBthHfpDisconnect() /*++ @@ -5650,17 +5652,17 @@ Routine Description: This function synchronously requests a Bluetooth Hands-Free Profile level connection to the paired Bluetooth device. - This request initiates disconnection of the Service Level Connection and - completes without waiting for the disconnection to complete. Connection + This request initiates disconnection of the Service Level Connection and + completes without waiting for the disconnection to complete. Connection status can be determined using IOCTL_BTHHFP_GET_CONNECTION_STATUS_UPDATE. --*/ { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::SetBthHfpDisconnect]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; - + ntStatus = SendIoCtrlSynchronously( NULL, IOCTL_BTHHFP_DEVICE_REQUEST_DISCONNECT, @@ -5677,7 +5679,7 @@ Routine Description: // All done. // ntStatus = STATUS_SUCCESS; - + Done: return ntStatus; @@ -5685,7 +5687,7 @@ Done: //============================================================================= #pragma code_seg() -void +void BthHfpDevice::EvtBthHfpDeviceStreamStatusCompletion ( _In_ WDFREQUEST Request, @@ -5697,18 +5699,18 @@ BthHfpDevice::EvtBthHfpDeviceStreamStatusCompletion Routine Description: - Completion callback for the Bluetooth Hands-Free Profile SCO Bypass - stream status notification. + Completion callback for the Bluetooth Hands-Free Profile SCO Bypass + stream status notification. --*/ { DPF_ENTER(("[BthHfpDevice::EvtBthHfpDeviceStreamStatusCompletion]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; BthHfpDeviceNotificationReqContext * reqCtx = NULL; BthHfpDevice * This = NULL; NTSTATUS ntResult = STATUS_SUCCESS; - + UNREFERENCED_PARAMETER(Target); UNREFERENCED_PARAMETER(Context); @@ -5724,15 +5726,15 @@ Routine Description: { ntResult = STATUS_INVALID_DEVICE_STATE; } - else + else { ntResult = reqCtx->Buffer.NtStatus; } InterlockedExchange(&This->m_StreamStatusLong, (LONG)ntResult); - + // - // Let the stop routine know we are done. Stop routine will + // Let the stop routine know we are done. Stop routine will // re-init the request. // KeSetEvent(&This->m_StreamStatusEvent, IO_NO_INCREMENT, FALSE); @@ -5740,29 +5742,29 @@ Routine Description: //============================================================================= #pragma code_seg() -NTSTATUS +NTSTATUS BthHfpDevice::EnableBthHfpStreamStatusNotification() /*++ Routine Description: - This function registers for Bluetooth Hands-Free Profile SCO Bypass - stream status notification. + This function registers for Bluetooth Hands-Free Profile SCO Bypass + stream status notification. --*/ { DPF_ENTER(("[BthHfpDevice::EnableBthHfpStreamStatusNotification]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; BthHfpDeviceNotificationReqContext * ctx = NULL; ASSERT(m_nStreams > 0); - + ctx = GetBthHfpDeviceNotificationReqContext(m_StreamReq); - ctx->Buffer.bImmediate = FALSE; + ctx->Buffer.bImmediate = FALSE; KeClearEvent(&m_StreamStatusEvent); - + // // Get the Bth HFP SCO Bypass connection status. // @@ -5773,7 +5775,7 @@ Routine Description: ctx->MemOut, EvtBthHfpDeviceStreamStatusCompletion, this); - + if (!NT_SUCCESS(ntStatus)) { KeSetEvent(&m_StreamStatusEvent, IO_NO_INCREMENT, FALSE); @@ -5785,7 +5787,7 @@ Routine Description: // All done. // ntStatus = STATUS_SUCCESS; - + Done: return ntStatus; @@ -5793,13 +5795,13 @@ Done: //============================================================================= #pragma code_seg("PAGE") -NTSTATUS +NTSTATUS BthHfpDevice::StopBthHfpStreamStatusNotification() /*++ Routine Description: - This function stops the Bluetooth Hands-Free Profile SCO Bypass + This function stops the Bluetooth Hands-Free Profile SCO Bypass connection status notification. The function waits for the request to be done before returning. @@ -5807,26 +5809,26 @@ Routine Description: { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::StopBthHfpStreamStatusNotification]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; BthHfpDeviceNotificationReqContext * reqCtx = NULL; - WDF_REQUEST_REUSE_PARAMS reuseParams; - + WDF_REQUEST_REUSE_PARAMS reuseParams; + WdfRequestCancelSentRequest(m_StreamReq); KeWaitForSingleObject(&m_StreamStatusEvent, Executive, KernelMode, FALSE, NULL); reqCtx = GetBthHfpDeviceNotificationReqContext(m_StreamReq); ASSERT(reqCtx != NULL); UNREFERENCED_VAR(reqCtx); - - // + + // // Re-init the request for later. // WDF_REQUEST_REUSE_PARAMS_INIT( - &reuseParams, + &reuseParams, WDF_REQUEST_REUSE_NO_FLAGS, STATUS_SUCCESS); - + ntStatus = WdfRequestReuse(m_StreamReq, &reuseParams); if (!NT_SUCCESS(ntStatus)) { @@ -5838,7 +5840,7 @@ Routine Description: //============================================================================= #pragma code_seg("PAGE") -NTSTATUS +NTSTATUS BthHfpDevice::SetBthHfpStreamOpen() /*++ @@ -5851,9 +5853,9 @@ Routine Description: { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::SetBthHfpStreamOpen]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; - + ntStatus = SendIoCtrlSynchronously( NULL, IOCTL_BTHHFP_STREAM_OPEN, @@ -5867,7 +5869,7 @@ Routine Description: DPF(D_VERBOSE, ("SetBthHfpStreamOpen: the stream channel is already open")); ntStatus = STATUS_SUCCESS; } - + IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("SetBthHfpStreamOpen: SendIoCtrlSynchronously(IOCTL_BTHHFP_STREAM_OPEN) failed, 0x%x", ntStatus)), @@ -5877,7 +5879,7 @@ Routine Description: // All done. // ntStatus = STATUS_SUCCESS; - + Done: return ntStatus; @@ -5885,7 +5887,7 @@ Done: //============================================================================= #pragma code_seg("PAGE") -NTSTATUS +NTSTATUS BthHfpDevice::SetBthHfpStreamClose() /*++ @@ -5897,9 +5899,9 @@ Routine Description: { PAGED_CODE(); DPF_ENTER(("[BthHfpDevice::SetBthHfpStreamClose]")); - + NTSTATUS ntStatus = STATUS_SUCCESS; - + ntStatus = SendIoCtrlSynchronously( NULL, IOCTL_BTHHFP_STREAM_CLOSE, @@ -5916,7 +5918,7 @@ Routine Description: // All done. // ntStatus = STATUS_SUCCESS; - + Done: return ntStatus; @@ -5924,7 +5926,7 @@ Done: //============================================================================= #pragma code_seg("PAGE") -VOID +VOID BthHfpDevice::Start() /*++ @@ -5966,9 +5968,9 @@ Routine Description: // Volume settings. ntStatus = GetBthHfpVolumePropertyValues( - m_Descriptor->VolumePropertyValuesSize, + m_Descriptor->VolumePropertyValuesSize, &volumePropValues); - + IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("Start: GetBthHfpVolumePropertyValues: failed to retrieve KSPROPERTY_VALUES, 0x%x", ntStatus)), @@ -5991,9 +5993,9 @@ Routine Description: ntStatus, DPF(D_ERROR, ("Start: GetBthHfpMicVolume: failed, 0x%x", ntStatus)), Done); - + m_MicVolumeLevel = volume; - } + } // // Get connection status. @@ -6031,8 +6033,8 @@ Routine Description: // Customize the topology/wave descriptors for this instance // ntStatus = CreateCustomEndpointMinipair( - g_BthHfpRenderEndpoints[bthMiniportsIndex], - &m_Descriptor->FriendlyName, + g_BthHfpRenderEndpoints[bthMiniportsIndex], + &m_Descriptor->FriendlyName, &m_Descriptor->OutputPinCategory, &m_SpeakerMiniports); IF_FAILED_ACTION_JUMP( @@ -6041,7 +6043,7 @@ Routine Description: Done); ntStatus = CreateCustomEndpointMinipair( - g_BthHfpCaptureEndpoints[bthMiniportsIndex], + g_BthHfpCaptureEndpoints[bthMiniportsIndex], &m_Descriptor->FriendlyName, &m_Descriptor->InputPinCategory, &m_MicMiniports); @@ -6065,7 +6067,7 @@ Routine Description: &m_UnknownSpeakerTopology, &m_UnknownSpeakerWave, NULL, NULL ); - + IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("Start: InstallEndpointRenderFilters (Bth HFP SCO-Bypass): failed, 0x%x", ntStatus)), @@ -6078,7 +6080,7 @@ Routine Description: &m_UnknownMicTopology, &m_UnknownMicWave, NULL, NULL ); - + IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("Start: InstallEndpointCaptureFilters (Bth HFP SCO-Bypass): failed, 0x%x", ntStatus)), @@ -6087,28 +6089,28 @@ Routine Description: // // Pend status notifications. // - + // NREC disable AudioGateway (AG) status. ntStatus = EnableBthHfpNrecDisableStatusNotification(); IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("Start: EnableBthHfpNrecDisableStatusNotification: failed, 0x%x", ntStatus)), Done); - + // Volume speaker status. ntStatus = EnableBthHfpSpeakerVolumeStatusNotification(); IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("Start: EnableBthHfpSpeakerVolumeStatusNotification: failed, 0x%x", ntStatus)), Done); - + // Volume mic status. ntStatus = EnableBthHfpMicVolumeStatusNotification(); IF_FAILED_ACTION_JUMP( ntStatus, DPF(D_ERROR, ("Start: EnableBthHfpMicVolumeStatusNotification: failed, 0x%x", ntStatus)), Done); - + // Connection status. ntStatus = EnableBthHfpConnectionStatusNotification(); IF_FAILED_ACTION_JUMP( @@ -6120,7 +6122,7 @@ Routine Description: // All done. // ntStatus = STATUS_SUCCESS; - + Done:; if (!NT_SUCCESS(ntStatus)) { @@ -6314,10 +6316,10 @@ BthHfpDevice::DeleteCustomEndpointMinipair ExFreePoolWithTag(pCustomMinipair, SYSVAD_POOLTAG); } } - + //============================================================================= #pragma code_seg("PAGE") -VOID +VOID BthHfpDevice::Stop() /*++ @@ -6326,7 +6328,7 @@ Routine Description: Asynchronously called to stop the audio device. After returning from this function, there are no more async notifications pending (volume, connection, etc.). - + --*/ { PAGED_CODE(); @@ -6338,7 +6340,7 @@ Routine Description: state = (eBthHfpState) InterlockedExchange((PLONG)&m_State, eBthHfpStateStopping); ASSERT(state == eBthHfpStateRunning || state == eBthHfpStateFailed); UNREFERENCED_VAR(state); - + // // Stop async notifications. // @@ -6348,7 +6350,7 @@ Routine Description: // Wait for work-item. // WdfWorkItemFlush(m_WorkItem); - + // // Remove the topology and wave render filters. // @@ -6358,7 +6360,7 @@ Routine Description: m_SpeakerMiniports, m_UnknownSpeakerTopology, m_UnknownSpeakerWave); - + if (!NT_SUCCESS(ntStatus)) { DPF(D_ERROR, ("RemoveEndpointFilters (Bth HFP SCO-Bypass Speaker): failed, 0x%x", ntStatus)); @@ -6374,7 +6376,7 @@ Routine Description: m_MicMiniports, m_UnknownMicTopology, m_UnknownMicWave); - + if (!NT_SUCCESS(ntStatus)) { DPF(D_ERROR, ("RemoveEndpointFilters (Bth HFP SCO-Bypass Capture): failed, 0x%x", ntStatus)); @@ -6404,4 +6406,139 @@ Routine Description: #endif // SYSVAD_BTH_BYPASS +// +// The following are copied from: +// \Program Files\Windows Kits\10\Include\10.0.15063.0\km\stdunk.h +// + +#ifdef _NEW_DELETE_OPERATORS_ + +// Note: Since VS2015 Update 2 overloaded operator new and operator delete may not +// be declared inline (Level 1 (/W1) on-by-default, warning C4595). +// See https://msdn.microsoft.com/en-us/library/mt656697.aspx +// +// To mitigate this issue, add "#define _NEW_DELETE_OPERATORS_" before "#include <stdunk.h>" +// and implement non-inline operator new and operator delete locally. + +/***************************************************************************** + * ::new() + ***************************************************************************** + * New function for creating objects with a specified allocation tag. + */ +// PVOID operator new +// ( +// size_t iSize, +// _When_((poolType & NonPagedPoolMustSucceed) != 0, +// __drv_reportError("Must succeed pool allocations are forbidden. " +// "Allocation failures cause a system crash")) +// POOL_TYPE poolType +// ) +// { +// PVOID result = ExAllocatePoolWithTag(poolType,iSize,'wNcP'); +// +// if (result) +// { +// RtlZeroMemory(result,iSize); +// } +// +// return result; +// } + +/***************************************************************************** + * ::new() + ***************************************************************************** + * New function for creating objects with a specified allocation tag. + */ +PVOID operator new +( + size_t iSize, + _When_((poolType & NonPagedPoolMustSucceed) != 0, + __drv_reportError("Must succeed pool allocations are forbidden. " + "Allocation failures cause a system crash")) + POOL_TYPE poolType, + ULONG tag +) +{ + PVOID result = ExAllocatePoolWithTag(poolType,iSize,tag); + + if (result) + { + RtlZeroMemory(result,iSize); + } + + return result; +} + +/***************************************************************************** + * ::delete() + ***************************************************************************** + * Delete function. + */ +// void __cdecl operator delete +// ( +// PVOID pVoid +// ) +// { +// if (pVoid) +// { +// ExFreePool(pVoid); +// } +// } + +/***************************************************************************** + * ::delete() + ***************************************************************************** + * Delete function. + */ +// void __cdecl operator delete +// ( +// PVOID pVoid, +// ULONG tag +// ) +// { +// if (pVoid) +// { +// ExFreePoolWithTag(pVoid,tag); +// } +// } + +void __cdecl operator delete +( + _Pre_maybenull_ __drv_freesMem(Mem) PVOID pVoid, + _In_ size_t cbSize +) +{ + UNREFERENCED_PARAMETER(cbSize); + + if (pVoid) + { + ExFreePool(pVoid); + } +} + +void __cdecl operator delete[] +( + _Pre_maybenull_ __drv_freesMem(Mem) PVOID pVoid +) +{ + if (pVoid) + { + ExFreePool(pVoid); + } +} + +// void __cdecl operator delete[] +// ( +// _Pre_maybenull_ __drv_freesMem(Mem) PVOID pVoid, +// _In_ size_t cbSize +// ) +// { +// UNREFERENCED_PARAMETER(cbSize); + +// if (pVoid) +// { +// ExFreePool(pVoid); +// } +// } +#endif //!_NEW_DELETE_OPERATORS_ diff --git a/audio/sysvad/sysvad.h b/audio/sysvad/sysvad.h index 0065f3e3..e99a54b2 100644 --- a/audio/sysvad/sysvad.h +++ b/audio/sysvad/sysvad.h @@ -16,7 +16,27 @@ Abstract: #define _SYSVAD_H_ #include <portcls.h> + +// Note: Since VS2015 Update 2 overloaded operator new and operator delete may not +// be declared inline (Level 1 (/W1) on-by-default, warning C4595). +// See https://msdn.microsoft.com/en-us/library/mt656697.aspx +// +// To mitigate this issue, add "#define _NEW_DELETE_OPERATORS_" before "#include <stdunk.h>" +// and implement non-inline operator new and operator delete locally. +// +#define _NEW_DELETE_OPERATORS_ #include <stdunk.h> +// non-inline operator new and operator delete are implemented in common.cpp +PVOID operator new +( + size_t iSize, + _When_((poolType & NonPagedPoolMustSucceed) != 0, + __drv_reportError("Must succeed pool allocations are forbidden. " + "Allocation failures cause a system crash")) + POOL_TYPE poolType, + ULONG tag +); + #include <ksdebug.h> #include <ntintsafe.h> #include <wdf.h> @@ -42,7 +62,7 @@ DEFINE_GUIDSTRUCT("5B722BF8-F0AB-47ee-B9C8-8D61D31375A1", PID_SYSVAD); #define PID_SYSVAD DEFINE_GUIDNAMED(PID_SYSVAD) // Pool tag used for SYSVAD allocations -#define SYSVAD_POOLTAG 'DVSM' +#define SYSVAD_POOLTAG 'DVSM' // Debug module name #define STR_MODULENAME "SYSVAD: " @@ -50,9 +70,9 @@ DEFINE_GUIDSTRUCT("5B722BF8-F0AB-47ee-B9C8-8D61D31375A1", PID_SYSVAD); // Debug utility macros #define D_FUNC 4 #define D_BLAB DEBUGLVL_BLAB -#define D_VERBOSE DEBUGLVL_VERBOSE -#define D_TERSE DEBUGLVL_TERSE -#define D_ERROR DEBUGLVL_ERROR +#define D_VERBOSE DEBUGLVL_VERBOSE +#define D_TERSE DEBUGLVL_TERSE +#define D_ERROR DEBUGLVL_ERROR #define DPF _DbgPrintF #define DPF_ENTER(x) DPF(D_FUNC, x) @@ -67,7 +87,7 @@ DEFINE_GUIDSTRUCT("5B722BF8-F0AB-47ee-B9C8-8D61D31375A1", PID_SYSVAD); #define KSPROPERTY_TYPE_ALL KSPROPERTY_TYPE_BASICSUPPORT | \ KSPROPERTY_TYPE_GET | \ KSPROPERTY_TYPE_SET - + // Specific node numbers #define DEV_SPECIFIC_VT_BOOL 9 #define DEV_SPECIFIC_VT_I4 10 @@ -90,7 +110,7 @@ DEFINE_GUIDSTRUCT("5B722BF8-F0AB-47ee-B9C8-8D61D31375A1", PID_SYSVAD); #define VALUE_NORMALIZE(v, step) \ ((v) > 0 ? VALUE_NORMALIZE_P((v), (step)) : -(VALUE_NORMALIZE_P(-(v), (step)))) - + #define VALUE_NORMALIZE_IN_RANGE_EX(v, min, max, step) \ ((v) > (max) ? (max) : \ (v) < (min) ? (min) : \ @@ -216,7 +236,7 @@ typedef struct _PortClassDeviceContext // 32 64 Byte off ULONG_PTR m_pulReserved1[2]; // 0-7 0-15 First two pointers are reserved. PDEVICE_OBJECT m_DoNotUsePhysicalDeviceObject; // 8-11 16-23 Reserved pointer to our Physical Device Object (PDO). PVOID m_pvReserved2; // 12-15 24-31 Reserved pointer to our Start Device function. - PVOID m_pvReserved3; // 16-19 32-39 "Out Memory" according to DDK. + PVOID m_pvReserved3; // 16-19 32-39 "Out Memory" according to DDK. IAdapterCommon* m_pCommon; // 20-23 40-47 Pointer to our adapter common object. #ifdef _USE_SingleComponentMultiFxStates POHANDLE m_poHandle; // 24-27 48-55 PoFxDevice handle. @@ -234,7 +254,7 @@ typedef struct _PortClassDeviceContext // 32 64 Byte off // #define MajorTarget_to_Obj(ptr) \ reinterpret_cast<CMiniportWaveRT*>(ptr) - + #define MinorTarget_to_Obj(ptr) \ static_cast<CMiniportWaveRTStream*>(reinterpret_cast<PMINIPORTWAVERTSTREAM>(ptr)) @@ -250,8 +270,8 @@ extern DWORD g_DisableBthScoBypass; // Generic topology handler NTSTATUS PropertyHandler_Topology -( - _In_ PPCPROPERTY_REQUEST PropertyRequest +( + _In_ PPCPROPERTY_REQUEST PropertyRequest ); // Default WaveFilter automation table. @@ -267,8 +287,8 @@ NTSTATUS PropertyHandler_OffloadPin ); NTSTATUS PropertyHandler_GenericPin -( - _In_ PPCPROPERTY_REQUEST PropertyRequest +( + _In_ PPCPROPERTY_REQUEST PropertyRequest ); // common.h uses some of the above definitions. diff --git a/audio/sysvad/sysvad.sln b/audio/sysvad/sysvad.sln index d504350b..4aef7d1f 100644 --- a/audio/sysvad/sysvad.sln +++ b/audio/sysvad/sysvad.sln @@ -7,8 +7,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Package", "Package", "{FA56 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "KeywordDetectorAdapter", "KeywordDetectorAdapter", "{DBD14E7B-7F95-4743-86E3-4E16FA43F990}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PropPageExtensions", "PropPageExtensions", "{50D3DF82-019A-4434-B17F-72BBC291415F}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SwapAPO", "SwapAPO", "{684FF1CF-64CC-430E-81F7-9D603EF56D59}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "APO", "APO", "{367FF255-7280-48C4-90AC-767124A8D5F7}" @@ -23,8 +21,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "package", "package\package. EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeywordDetectorContosoAdapter", "KeywordDetectorAdapter\KeywordDetectorContosoAdapter.vcxproj", "{E0F02048-78A4-4FE8-B863-66E6CB6A2C37}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PropPageExt", "SwapAPO\PropPageExtensions\PropPageExt.vcxproj", "{D253C552-154D-49E1-820A-B2CD9D9FF13E}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SwapAPO", "SwapAPO\APO\SwapAPO.vcxproj", "{691F1D0F-CA50-46CD-8BBA-A59E9E8EB601}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DelayAPO", "SwapAPO\DelayAPO\DelayAPO.vcxproj", "{8851AB85-70B3-4798-A149-BA366DF9EC25}" @@ -65,14 +61,6 @@ Global {E0F02048-78A4-4FE8-B863-66E6CB6A2C37}.Debug|x64.Build.0 = Debug|x64 {E0F02048-78A4-4FE8-B863-66E6CB6A2C37}.Release|x64.ActiveCfg = Release|x64 {E0F02048-78A4-4FE8-B863-66E6CB6A2C37}.Release|x64.Build.0 = Release|x64 - {D253C552-154D-49E1-820A-B2CD9D9FF13E}.Debug|Win32.ActiveCfg = Debug|Win32 - {D253C552-154D-49E1-820A-B2CD9D9FF13E}.Debug|Win32.Build.0 = Debug|Win32 - {D253C552-154D-49E1-820A-B2CD9D9FF13E}.Release|Win32.ActiveCfg = Release|Win32 - {D253C552-154D-49E1-820A-B2CD9D9FF13E}.Release|Win32.Build.0 = Release|Win32 - {D253C552-154D-49E1-820A-B2CD9D9FF13E}.Debug|x64.ActiveCfg = Debug|x64 - {D253C552-154D-49E1-820A-B2CD9D9FF13E}.Debug|x64.Build.0 = Debug|x64 - {D253C552-154D-49E1-820A-B2CD9D9FF13E}.Release|x64.ActiveCfg = Release|x64 - {D253C552-154D-49E1-820A-B2CD9D9FF13E}.Release|x64.Build.0 = Release|x64 {691F1D0F-CA50-46CD-8BBA-A59E9E8EB601}.Debug|Win32.ActiveCfg = Debug|Win32 {691F1D0F-CA50-46CD-8BBA-A59E9E8EB601}.Debug|Win32.Build.0 = Debug|Win32 {691F1D0F-CA50-46CD-8BBA-A59E9E8EB601}.Release|Win32.ActiveCfg = Release|Win32 @@ -120,13 +108,11 @@ Global GlobalSection(NestedProjects) = preSolution {830B14D5-0E32-4F9E-AEFA-4C9F6FC13C2A} = {FA56D96B-290B-4C73-A5E1-02C1861D3224} {E0F02048-78A4-4FE8-B863-66E6CB6A2C37} = {DBD14E7B-7F95-4743-86E3-4E16FA43F990} - {D253C552-154D-49E1-820A-B2CD9D9FF13E} = {50D3DF82-019A-4434-B17F-72BBC291415F} {691F1D0F-CA50-46CD-8BBA-A59E9E8EB601} = {367FF255-7280-48C4-90AC-767124A8D5F7} {8851AB85-70B3-4798-A149-BA366DF9EC25} = {367FF255-7280-48C4-90AC-767124A8D5F7} {33E61864-6F2C-4F9F-BE70-8F8985A4F283} = {0B4B8E51-20A8-43A4-A8DA-42FF90D628AC} {FABA4668-DB5E-4F6C-9D25-A0B25AD084EE} = {D0DBEBE9-0DCC-4EA7-966B-C029C1334D9E} {E4DF0EEE-D35B-47F2-A9B1-41EA97C465FF} = {C06F6070-75EE-4F57-8D35-4AC2AB08D029} - {50D3DF82-019A-4434-B17F-72BBC291415F} = {684FF1CF-64CC-430E-81F7-9D603EF56D59} {367FF255-7280-48C4-90AC-767124A8D5F7} = {684FF1CF-64CC-430E-81F7-9D603EF56D59} EndGlobalSection EndGlobal |
