IAudioDeviceModulesClient::SetAudioDeviceModulesManager 方法 (audioenginebaseapo.h)
由系统调用,以将 AudioDeviceModulesManager 的实例传递到实现 IAudioDeviceModulesClient 接口 (ADO) 音频处理对象。
语法
HRESULT SetAudioDeviceModulesManager(
IUnknown *pAudioDeviceModulesManager
);
参数
pAudioDeviceModulesManager
表示 IAudioDeviceModulesManager 的 IUnknown 接口。
返回值
HRESULT。
注解
下面的代码示例演示 IAudioDeviceModulesClient 的实现。
STDMETHODIMP CTestModuleAPO::SetAudioDeviceModulesManager(_In_ IUnknown* pAudioDeviceModulesManager)
{
HRESULT hr = S_OK;
CComQIPtr<Windows::Media::Devices::IAudioDeviceModulesManager> spModuleManager = pAudioDeviceModulesManager;
ComPtr<IVectorView<AudioDeviceModule *>> spModules;
// Cache the audio modules manager for later use within the apo
m_AudioModulesManager = pAudioDeviceModulesManager;
// Search the audio modules for a known module
hr = m_pAudioDeviceModulesMgr->FindAllById(KNOWN_MODULE_ID, &spModules);
if (SUCCEEDED(hr))
{
// do something with the module(s) returned or cache them for later usage
m_KnownModules = spModules;
}
return hr;
}
要求
要求 | 值 |
---|---|
最低受支持的客户端 | Windows 10内部版本 20348 |
标头 | audioenginebaseapo.h |