Init COM on thread (WASAPI won't work with libopenshot-audio without this line)

This commit is contained in:
Jonathan Thomas
2019-03-30 15:43:34 -05:00
parent 10835cb6be
commit 29b42e6cf6

View File

@@ -1572,6 +1572,9 @@ private:
StringArray& outDeviceIds,
StringArray& inDeviceIds)
{
// Init COM on thread (WASAPI won't work with libopenshot-audio without this line)
CoInitialize(0);
if (enumerator == nullptr)
{
if (! check (enumerator.CoCreateInstance (__uuidof (MMDeviceEnumerator))))