IAudioDeviceModulesClient::SetAudioDeviceModulesManager 方法 (audioenginebaseapo.h)
由系統呼叫,將 AudioDeviceModulesManager 的實例傳遞至音訊處理物件, (API) 實作 IAudioDeviceModulesClient 介面。
語法
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 |