summaryrefslogtreecommitdiff
path: root/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter
diff options
context:
space:
mode:
authorDaniel Rugerio <[email protected]>2025-11-25 11:00:04 -0800
committerDaniel Rugerio <[email protected]>2025-12-15 14:00:37 -0800
commit6fa87d3bef7972f7fac034adb68cd856f69c8607 (patch)
tree90ddf9e506b651c81dd803e0a9cc04af5db24a79 /audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter
parent1d89a1513f519f62226f84a3131916ab2fd0c3ef (diff)
New SDCAVAD sample.
Diffstat (limited to 'audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter')
-rw-r--r--audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.cpp211
-rw-r--r--audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.def6
-rw-r--r--audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.idl20
-rw-r--r--audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.rc13
-rw-r--r--audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.vcxproj433
-rw-r--r--audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.vcxproj.Filters17
-rw-r--r--audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/dllmain.cpp35
-rw-r--r--audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/stdafx.cpp6
-rw-r--r--audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/stdafx.h13
-rw-r--r--audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/targetver.h10
10 files changed, 764 insertions, 0 deletions
diff --git a/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.cpp b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.cpp
new file mode 100644
index 00000000..8a8ec90d
--- /dev/null
+++ b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.cpp
@@ -0,0 +1,211 @@
+// Copyright (C) Microsoft Corporation. All rights reserved.
+#include "stdafx.h"
+
+#include <strsafe.h>
+#include <mfapi.h>
+
+#include <initguid.h>
+#include "EventDetectorContosoAdapter.h"
+#include "ContosoEventDetector.h"
+#include <wrl.h>
+
+using namespace Microsoft::WRL;
+
+class EventDetectorContosoAdapter : public RuntimeClass<RuntimeClassFlags<ClassicCom>, IEventDetectorOemAdapter>
+{
+public:
+ EventDetectorContosoAdapter()
+ {
+ }
+
+ STDMETHODIMP GetCapabilities(
+ _Out_ EVENTFEATURES* GlobalFeatureSupport,
+ _Outptr_ LANGID** LangIds,
+ _Out_ ULONG* NumLanguages,
+ _Out_ ULONG* NumUserRecordings,
+ _Outptr_ WAVEFORMATEX** ppFormat)
+ {
+ const WAVEFORMATEX waveFormat = { WAVE_FORMAT_PCM, 1, 16000, 32000, 2, 16, 0 };
+
+ *ppFormat = (WAVEFORMATEX *)CoTaskMemAlloc(sizeof(WAVEFORMATEX));
+ if (*ppFormat == nullptr)
+ {
+ return E_OUTOFMEMORY;
+ }
+
+ memcpy(*ppFormat, &waveFormat, sizeof(WAVEFORMATEX));
+
+ *GlobalFeatureSupport = EVENTFEATURES_NoEventFeatures;
+
+ *LangIds = (LANGID *)CoTaskMemAlloc(sizeof(LANGID));
+
+ if (*LangIds == nullptr)
+ {
+ return E_OUTOFMEMORY;
+ }
+
+ **LangIds = 0x0409;
+ *NumLanguages = 1;
+ *NumUserRecordings = 0;
+
+ return S_OK;
+ }
+
+ STDMETHODIMP GetCapabilitiesForLanguage(
+ _In_ LANGID LangId,
+ _Outptr_ DETECTIONEVENT** EventIds,
+ _Out_ ULONG* NumEvents)
+ {
+ if (LangId == 0x0409)
+ {
+ DETECTIONEVENT events[] = { { CONTOSO_KEYWORD1, EVENTFEATURES_NoEventFeatures, {0}, L"Contoso 1", TRUE },
+ { CONTOSO_KEYWORD2, EVENTFEATURES_NoEventFeatures, {0}, L"Contoso 2", TRUE } };
+
+ *EventIds = (DETECTIONEVENT *)CoTaskMemAlloc(sizeof(events));
+ if (*EventIds == nullptr)
+ {
+ return E_OUTOFMEMORY;
+ }
+
+ memcpy(*EventIds, &events, sizeof(events));
+ *NumEvents = 2;
+ }
+ else
+ {
+ return E_INVALIDARG;
+ }
+
+ return S_OK;
+ }
+
+ STDMETHODIMP VerifyUserEventData(
+ _In_ IStream* ModelData,
+ _In_ WAVEFORMATEX* UserRecording,
+ _In_ DETECTIONEVENTSELECTOR EventSelector,
+ _In_ LONG EventEndBytePos)
+ {
+ UNREFERENCED_PARAMETER(ModelData);
+ UNREFERENCED_PARAMETER(UserRecording);
+ UNREFERENCED_PARAMETER(EventSelector);
+ UNREFERENCED_PARAMETER(EventEndBytePos);
+
+ return E_NOTIMPL;
+ }
+
+ STDMETHODIMP ComputeAndAddUserModelData(
+ _Inout_ IStream* ModelData,
+ _In_ DETECTIONEVENTSELECTOR EventSelector,
+ _In_ LONG* EventEndBytePos,
+ _In_ WAVEFORMATEX** UserRecordings,
+ _In_ ULONG NumUserRecordings)
+ {
+ UNREFERENCED_PARAMETER(ModelData);
+ UNREFERENCED_PARAMETER(EventSelector);
+ UNREFERENCED_PARAMETER(EventEndBytePos);
+ UNREFERENCED_PARAMETER(UserRecordings);
+ UNREFERENCED_PARAMETER(NumUserRecordings);
+
+ return E_NOTIMPL;
+ }
+
+ STDMETHODIMP BuildArmingPatternData(
+ _In_ IStream* UserModelData,
+ _In_ DETECTIONEVENTSELECTOR* EventSelectors,
+ _In_ ULONG NumEventSelectors,
+ _Outptr_ SOUNDDETECTOR_PATTERNHEADER** ppPatternData)
+ {
+ CONTOSO_KEYWORDCONFIGURATION *pPatternData = nullptr;
+
+ UNREFERENCED_PARAMETER(UserModelData);
+
+ if (NumEventSelectors > 2)
+ {
+ return E_INVALIDARG;
+ }
+
+ if ((EventSelectors[0].Event.EventId != CONTOSO_KEYWORD1 && EventSelectors[0].Event.EventId != CONTOSO_KEYWORD2) ||
+ (EventSelectors[0].UserId != 0) || (EventSelectors[0].LangId != 0x0409))
+ {
+ return E_INVALIDARG;
+ }
+
+ pPatternData = (CONTOSO_KEYWORDCONFIGURATION*)CoTaskMemAlloc(sizeof(CONTOSO_KEYWORDCONFIGURATION));
+ if (pPatternData == nullptr)
+ {
+ return E_OUTOFMEMORY;
+ }
+
+ pPatternData->Header.Size = sizeof(*pPatternData);
+ pPatternData->Header.PatternType = CONTOSO_KEYWORDCONFIGURATION_IDENTIFIER2;
+ pPatternData->ContosoDetectorConfigurationData = 0x12345678;
+
+ *ppPatternData = &pPatternData->Header;
+ pPatternData = nullptr;
+
+ return S_OK;
+ }
+
+ STDMETHODIMP ParseDetectionResultData(
+ _In_ IStream* UserModelData,
+ _In_ SOUNDDETECTOR_PATTERNHEADER* Result,
+ _Outptr_ SOUNDDETECTOR_PATTERNHEADER** AssistantContext,
+ _Out_ DETECTIONEVENTSELECTOR* EventSelector,
+ _Out_ EVENTACTION* EventAction,
+ _Out_ ULONG64* EventStartPerformanceCounterValue,
+ _Out_ ULONG64* EventEndPerformanceCounterValue,
+ _Outptr_ WCHAR** DebugOutput)
+ {
+ const CONTOSO_KEYWORDDETECTIONRESULT *contosoResult;
+
+ UNREFERENCED_PARAMETER(UserModelData);
+
+ if (Result->PatternType != CONTOSO_KEYWORDCONFIGURATION_IDENTIFIER2 || Result->Size < sizeof(CONTOSO_KEYWORDDETECTIONRESULT))
+ {
+ return E_INVALIDARG;
+ }
+
+ contosoResult = (CONTOSO_KEYWORDDETECTIONRESULT*)Result;
+
+ if (CONTOSO_KEYWORD1 == contosoResult->EventId)
+ {
+ wcscpy_s(EventSelector->Event.DisplayName, L"Contoso 1");
+ }
+ else if (CONTOSO_KEYWORD2 == contosoResult->EventId)
+ {
+ wcscpy_s(EventSelector->Event.DisplayName, L"Contoso 2");
+ }
+ else
+ {
+ return E_INVALIDARG;
+ }
+
+ // Fill in event action information for the actual detection, based on what has been armed.
+ EventSelector->Event.EventId = contosoResult->EventId;
+ EventSelector->Armed = TRUE;
+ EventSelector->UserId = 0;
+ EventSelector->LangId = 0x0409;
+
+ EventAction->EventdActionType = EVENTACTIONTYPE_Accept;
+ EventAction->EventActionContextType = EVENTACTIONCONTEXTTYPE_None;
+
+ // Retrieve the event start/stop times for the payload
+ *EventStartPerformanceCounterValue = contosoResult->KeywordStartTimestamp;
+ *EventEndPerformanceCounterValue = contosoResult->KeywordStopTimestamp;
+
+ *AssistantContext = nullptr;
+ *DebugOutput = nullptr;
+
+ return S_OK;
+ }
+
+ STDMETHODIMP_(void) ReportOSDetectionResult(
+ _In_ DETECTIONEVENTSELECTOR EventSelector,
+ _In_ EVENTACTION EventAction)
+ {
+ UNREFERENCED_PARAMETER(EventSelector);
+ UNREFERENCED_PARAMETER(EventAction);
+ }
+};
+
+CoCreatableClass(EventDetectorContosoAdapter);
+
diff --git a/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.def b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.def
new file mode 100644
index 00000000..ddeb3eac
--- /dev/null
+++ b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.def
@@ -0,0 +1,6 @@
+LIBRARY
+
+EXPORTS
+ DllGetActivationFactory PRIVATE
+ DllGetClassObject PRIVATE
+ DllCanUnloadNow PRIVATE
diff --git a/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.idl b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.idl
new file mode 100644
index 00000000..9289fba5
--- /dev/null
+++ b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.idl
@@ -0,0 +1,20 @@
+// Copyright (C) Microsoft Corporation. All rights reserved.
+
+import "oaidl.idl";
+import "ocidl.idl";
+
+import "EventDetectorOemAdapter.idl";
+
+[uuid(33C3430A-6199-4C55-831F-30EDF9D644EB), version(1.0)]
+library EventDetectorContosoAdapterLib
+{
+ // The class's uuid (i.e. the COM CLSID) must match that of the pattern
+ // type GUID returned by the audio driver
+ // 0x207f3d0c, 0x5c79, 0x496f, 0xa9, 0x4c, 0xd3, 0xd2, 0x93, 0x4d, 0xbf, 0xa9
+ [uuid(207F3D0C-5C79-496F-A94C-D3D2934DBFA9), version(1.0)]
+ coclass EventDetectorContosoAdapter
+ {
+ [default] interface IEventDetectorOemAdapter;
+ }
+};
+
diff --git a/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.rc b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.rc
new file mode 100644
index 00000000..d871dd72
--- /dev/null
+++ b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.rc
@@ -0,0 +1,13 @@
+#if 0
+Copyright (c) Microsoft Corporation. All Rights Reserved
+#endif
+
+#include "winres.h"
+#include <ntverp.h>
+#define VER_FILETYPE VFT_DLL
+#define VER_FILESUBTYPE VFT_UNKNOWN
+#define VER_FILEDESCRIPTION_STR "Contoso event detector adapter"
+#define VER_INTERNALNAME_STR "EventDetectorContosoAdapter"
+#define VER_ORIGINALFILENAME_STR "EventDetectorContosoAdapter.dll"
+#include <Common.ver>
+ \ No newline at end of file
diff --git a/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.vcxproj b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.vcxproj
new file mode 100644
index 00000000..10231100
--- /dev/null
+++ b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.vcxproj
@@ -0,0 +1,433 @@
+<?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>
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|ARM64">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM64">
+ <Configuration>Release</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{E0F02048-78A4-4FE8-B863-66E6CB6A2C37}</ProjectGuid>
+ <RootNamespace>$(MSBuildProjectName)</RootNamespace>
+ <SupportsPackaging>false</SupportsPackaging>
+ <RequiresPackageProject>true</RequiresPackageProject>
+ <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
+ <Platform Condition="'$(Platform)' == ''">Win32</Platform>
+ <SampleGuid>{C1851F27-BDAA-4DF1-8CA5-9D0176FD2B33}</SampleGuid>
+ <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>True</UseDebugLibraries>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
+ <DriverType />
+ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>False</UseDebugLibraries>
+ <DriverTargetPlatform>Universal</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>Universal</DriverTargetPlatform>
+ <DriverType />
+ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>False</UseDebugLibraries>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
+ <DriverType />
+ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>True</UseDebugLibraries>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
+ <DriverType />
+ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>False</UseDebugLibraries>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
+ <DriverType />
+ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>True</UseDebugLibraries>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
+ <DriverType />
+ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>False</UseDebugLibraries>
+ <DriverTargetPlatform>Universal</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)'=='Debug|Win32'">
+ <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|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|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|ARM'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ItemGroup Label="WrappedTaskItems" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetName>EventDetectorContosoAdapter</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <TargetName>EventDetectorContosoAdapter</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <TargetName>EventDetectorContosoAdapter</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <TargetName>EventDetectorContosoAdapter</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <TargetName>EventDetectorContosoAdapter</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <TargetName>EventDetectorContosoAdapter</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <TargetName>EventDetectorContosoAdapter</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <TargetName>EventDetectorContosoAdapter</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Link>
+ <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol>
+ <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Link>
+ <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol>
+ <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Link>
+ <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol>
+ <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Link>
+ <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol>
+ <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <Link>
+ <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol>
+ <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <Link>
+ <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol>
+ <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <Link>
+ <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol>
+ <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <Link>
+ <EntryPointSymbol Condition="'$(Platform)'=='win32'">_DllMainCRTStartup@12</EntryPointSymbol>
+ <EntryPointSymbol Condition="'$(Platform)'!='win32'">_DllMainCRTStartup</EntryPointSymbol>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='false'">MultiThreaded</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <WarningLevel>Level4</WarningLevel>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <WppRecorderEnabled>true</WppRecorderEnabled>
+ </ClCompile>
+ <Midl>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ </Midl>
+ <ResourceCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;mfplat.lib;runtimeobject.lib</AdditionalDependencies>
+ <ModuleDefinitionFile>EventDetectorContosoAdapter.def</ModuleDefinitionFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='false'">MultiThreaded</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <WarningLevel>Level4</WarningLevel>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <WppRecorderEnabled>true</WppRecorderEnabled>
+ </ClCompile>
+ <Midl>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ </Midl>
+ <ResourceCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;mfplat.lib;runtimeobject.lib</AdditionalDependencies>
+ <ModuleDefinitionFile>EventDetectorContosoAdapter.def</ModuleDefinitionFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='false'">MultiThreaded</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <WarningLevel>Level4</WarningLevel>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <WppRecorderEnabled>true</WppRecorderEnabled>
+ </ClCompile>
+ <Midl>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ </Midl>
+ <ResourceCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;mfplat.lib;runtimeobject.lib</AdditionalDependencies>
+ <ModuleDefinitionFile>EventDetectorContosoAdapter.def</ModuleDefinitionFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='false'">MultiThreaded</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <WarningLevel>Level4</WarningLevel>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <WppRecorderEnabled>true</WppRecorderEnabled>
+ </ClCompile>
+ <Midl>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ </Midl>
+ <ResourceCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;mfplat.lib;runtimeobject.lib</AdditionalDependencies>
+ <ModuleDefinitionFile>EventDetectorContosoAdapter.def</ModuleDefinitionFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <ClCompile>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='false'">MultiThreaded</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <WarningLevel>Level4</WarningLevel>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <WppRecorderEnabled>true</WppRecorderEnabled>
+ </ClCompile>
+ <Midl>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ </Midl>
+ <ResourceCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;mfplat.lib;runtimeobject.lib</AdditionalDependencies>
+ <ModuleDefinitionFile>EventDetectorContosoAdapter.def</ModuleDefinitionFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <ClCompile>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='false'">MultiThreaded</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <WarningLevel>Level4</WarningLevel>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <WppRecorderEnabled>true</WppRecorderEnabled>
+ </ClCompile>
+ <Midl>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ </Midl>
+ <ResourceCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;mfplat.lib;runtimeobject.lib</AdditionalDependencies>
+ <ModuleDefinitionFile>EventDetectorContosoAdapter.def</ModuleDefinitionFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <ClCompile>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='false'">MultiThreaded</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <WarningLevel>Level4</WarningLevel>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <WppRecorderEnabled>true</WppRecorderEnabled>
+ </ClCompile>
+ <Midl>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ </Midl>
+ <ResourceCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;mfplat.lib;runtimeobject.lib</AdditionalDependencies>
+ <ModuleDefinitionFile>EventDetectorContosoAdapter.def</ModuleDefinitionFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <ClCompile>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='false'">MultiThreaded</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebug</RuntimeLibrary>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <WarningLevel>Level4</WarningLevel>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <WppRecorderEnabled>true</WppRecorderEnabled>
+ </ClCompile>
+ <Midl>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ </Midl>
+ <ResourceCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;mfplat.lib;runtimeobject.lib</AdditionalDependencies>
+ <ModuleDefinitionFile>EventDetectorContosoAdapter.def</ModuleDefinitionFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="dllmain.cpp" />
+ <ClCompile Include="EventDetectorContosoAdapter.cpp" />
+ <ClCompile Include="stdafx.cpp" />
+ <Midl Include="EventDetectorContosoAdapter.idl" />
+ <ResourceCompile Include="EventDetectorContosoAdapter.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>
diff --git a/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.vcxproj.Filters b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.vcxproj.Filters
new file mode 100644
index 00000000..6637ef91
--- /dev/null
+++ b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/EventDetectorContosoAdapter.vcxproj.Filters
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
+ <UniqueIdentifier>{75C3E63D-04EA-4EB3-B9F1-505497C51F71}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Header Files">
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ <UniqueIdentifier>{5E8F8D4C-2886-4109-9E78-CE5EA6DB4AC4}</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>{75D3016A-4ED8-4FAF-9817-394BE1112534}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project>
diff --git a/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/dllmain.cpp b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/dllmain.cpp
new file mode 100644
index 00000000..39c15c7b
--- /dev/null
+++ b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/dllmain.cpp
@@ -0,0 +1,35 @@
+// Copyright (C) Microsoft Corporation. All rights reserved.
+#include "stdafx.h"
+#include <wrl\module.h>
+
+using namespace Microsoft::WRL;
+
+#if !defined(__WRL_CLASSIC_COM__)
+STDAPI DllGetActivationFactory(_In_ HSTRING activatibleClassId, _COM_Outptr_ IActivationFactory** factory)
+{
+ return Module<InProc>::GetModule().GetActivationFactory(activatibleClassId, factory);
+}
+#endif
+
+#if !defined(__WRL_WINRT_STRICT__)
+_Check_return_
+STDAPI DllGetClassObject(_In_ REFCLSID rclsid, _In_ REFIID riid, _Outptr_ LPVOID FAR* ppv)
+{
+ return Module<InProc>::GetModule().GetClassObject(rclsid, riid, ppv);
+}
+#endif
+
+__control_entrypoint(DllExport)
+STDAPI DllCanUnloadNow()
+{
+ return Module<InProc>::GetModule().Terminate() ? S_OK : S_FALSE;
+}
+
+STDAPI_(BOOL) DllMain(_In_ HINSTANCE hinst, DWORD reason, _In_opt_ void*)
+{
+ if (reason == DLL_PROCESS_ATTACH)
+ {
+ DisableThreadLibraryCalls(hinst);
+ }
+ return TRUE;
+}
diff --git a/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/stdafx.cpp b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/stdafx.cpp
new file mode 100644
index 00000000..cf76439a
--- /dev/null
+++ b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/stdafx.cpp
@@ -0,0 +1,6 @@
+// Copyright (C) Microsoft Corporation. All rights reserved.
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/stdafx.h b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/stdafx.h
new file mode 100644
index 00000000..6ed512c8
--- /dev/null
+++ b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/stdafx.h
@@ -0,0 +1,13 @@
+// Copyright (C) Microsoft Corporation. All rights reserved.
+
+#pragma once
+
+#include "targetver.h"
+
+//#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+// Windows Header Files:
+#include <windows.h>
+
+
+
+// TODO: reference additional headers your program requires here
diff --git a/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/targetver.h b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/targetver.h
new file mode 100644
index 00000000..847309f2
--- /dev/null
+++ b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/targetver.h
@@ -0,0 +1,10 @@
+// Copyright (C) Microsoft Corporation. All rights reserved.
+
+#pragma once
+
+// Including SDKDDKVer.h defines the highest available Windows platform.
+
+// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
+// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
+
+#include <SDKDDKVer.h>