【发布时间】:2014-11-15 16:59:36
【问题描述】:
我正在尝试编写一个与 Windows Core Audio 和 WASAPI 交互的程序。我对以下几行有困难。
CComHeapPtr<WCHAR> name;
hr = pAudioSessionControl->GetDisplayName(&name);
if (FAILED(hr)) {
LOG(L"IAudioSessionControl::GetDisplayName() failed: hr = 0x%08x", hr);
return -__LINE__; }
_tprintf(_T("Session Index %d, \"%s\"\n"), i, CString(name));
输出:
Session Index 0, "@%SystemRoot%\System32\AudioSrv.Dll,-202"
Session Index 1, ""
Session Index 2, ""
Session Index 3, ""
Press any key to continue . . .
这是 3 个程序都处于活动状态并发出噪音。看来我可以看到系统声音程序,但没有别的。
感谢您的帮助。
【问题讨论】: