From 8ffcdad009e4d410f92fabc4e322a76a0be3a69d Mon Sep 17 00:00:00 2001 From: Daniel Rugerio <50124185+darugeri@users.noreply.github.com> Date: Fri, 28 Jun 2019 16:08:54 -0700 Subject: Update audio samples (#387) * Update SysVAD public sample. * Add WaveTest public sample. --- audio/tests/wavetest/comptest.cpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 audio/tests/wavetest/comptest.cpp (limited to 'audio/tests/wavetest/comptest.cpp') diff --git a/audio/tests/wavetest/comptest.cpp b/audio/tests/wavetest/comptest.cpp new file mode 100644 index 00000000..ef41972c --- /dev/null +++ b/audio/tests/wavetest/comptest.cpp @@ -0,0 +1,37 @@ +// ------------------------------------------------------------------------------ +// +// Copyright (C) Microsoft. All rights reserved. +// +// Module Name: +// +// comptest.cpp +// +// Abstract: +// +// Implementation file for test cases +// +// ------------------------------------------------------------------------------- + +#include "PreComp.h" +#include "WaveTestTaef.h" +#include "tests.h" + +// ------------------------------------------------------------------------------ +// Test_VerifyPinSupportsPullMode: Test the requirement that WaveRT drivers must support pull mode audio streaming technology. +void Test_VerifyPinSupportsPullMode(void) +{ + CHalfApp* pHalfApp = g_pWaveTest->m_pHalf; + BOOL bIsRTCapable = false; + BOOL bIsEventCapable = false; + + VERIFY_SUCCEEDED(pHalfApp->InitializeEndpoint()); + + VERIFY_SUCCEEDED(pHalfApp->m_pAudioDeviceEndpoint->GetRTCaps(&bIsRTCapable)); + + // Only require pull mode for WaveRT drivers + if (bIsRTCapable) + { + VERIFY_SUCCEEDED(pHalfApp->m_pAudioDeviceEndpoint->GetEventDrivenCapable(&bIsEventCapable)); + VERIFY_IS_TRUE(bIsEventCapable); + } +} \ No newline at end of file -- cgit v1.3.1