We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1905c95 commit b3c15f3Copy full SHA for b3c15f3
webrtc-jni/src/main/cpp/src/media/audio/windows/WindowsAudioDeviceManager.cpp
@@ -59,6 +59,10 @@ namespace jni
59
60
std::set<AudioDevicePtr> WindowsAudioDeviceManager::getAudioCaptureDevices()
61
{
62
+ if (!comInitializer.isInitialized()) {
63
+ throw jni::Exception("Invalid COM thread model change (MTA->STA)");
64
+ }
65
+
66
if (captureDevices.empty()) {
67
enumerateDevices(eCapture);
68
}
@@ -68,6 +72,10 @@ namespace jni
72
69
73
std::set<AudioDevicePtr> WindowsAudioDeviceManager::getAudioPlaybackDevices()
70
74
75
76
77
78
71
79
if (playbackDevices.empty()) {
80
enumerateDevices(eRender);
81
0 commit comments