您好!
文档本身没错。你不能在WinRT环境下,使用IMMDevice接口。
在WinRT环境下,你可以用以下WinRT API获取Audio Endpoint。
Platform::String^ id = Windows::Media::Devices::MediaDevice::GetDefaultAudioCaptureId(Windows::Media::Devices::AudioDeviceRole::Console );
Microsoft::WRL::ComPtr<IAudioClient> pAudioClient = NULL;
ActivateAudioInterface( id->Data(), __uuidof( IAudioClient ), (void**)&pAudioClient );
Best wishes,
Robin [MSFT]
MSDN Community Support |
Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
