Skip to content

Commit

Permalink
Fixed CoInitialize has not been called #43
Browse files Browse the repository at this point in the history
  • Loading branch information
devopvoid committed Nov 23, 2021
1 parent 330704d commit 73df466
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "media/audio/AudioDeviceManager.h"
#include "platform/windows/ComPtr.h"
#include "platform/windows/ComInitializer.h"
#include "platform/windows/MFInitializer.h"
#include "mmdeviceapi.h"

Expand Down Expand Up @@ -53,6 +54,7 @@ namespace jni
STDMETHOD(OnDeviceStateChanged) (LPCWSTR deviceId, DWORD newState);
STDMETHOD(OnPropertyValueChanged) (LPCWSTR /*deviceId*/, const PROPERTYKEY /*key*/);

ComInitializer comInitializer;
MFInitializer initializer;
ComPtr<IMMDeviceEnumerator> deviceEnumerator;
};
Expand Down

0 comments on commit 73df466

Please sign in to comment.