Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. int sessionCount;
  2. hr = audioSessionEnumerator->GetCount(&sessionCount);
  3. if (FAILED(hr)) {
  4. throw HRESULTException("audioSessionEnumerator->GetCount", hr);
  5. }
  6.  
  7. IAudioSessionControl *audioSessionControl;
  8. for (int i = 0; i < sessionCount; ++i) {
  9. hr = audioSessionEnumerator->GetSession(i, &audioSessionControl);
  10. if (FAILED(hr)) {
  11. throw HRESULTException("audioSessionEnumerator->GetSession", hr);
  12. }
  13.  
  14. LPWSTR displayName;
  15. hr = audioSessionControl->GetDisplayName(&displayName);
  16. if (FAILED(hr)) {
  17. throw HRESULTException("audioSessionControl->GetDisplayName", hr);
  18. }
  19.  
  20. std::wcout << displayName << std::endl;
  21.  
  22. CoTaskMemFree(displayName);
  23.  
  24. audioSessionControl->Release();
  25. }
  26.  
  27. audioSessionEnumerator->Release();
  28.  
  29. Steam Client Bootstrapper
  30. melodysheep - The Face of Creation
  31. System Sounds
  32.  
  33. (blank line)
  34. (blank line)
  35. @%SystemRoot%System32AudioSrv.Dll,-202
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement