Hi everybody,
I'm a newbie into the JUCE world, and I have a simple question :
I want to use JUCE without all the Juce application stuff (because at the end I want to embbed it in an existing engine), but it seems like it does not like this...
When I try to initialise an AudioDeviceManager() in a simple main() function, I got an assertion in CoCreateInstance() :
jassert (hr != CO_E_NOTINITIALIZED); // You haven't called CoInitialize for the current thread!
The call stack :
> MidiTest.exe!juce::ComSmartPtr<juce::IMMDeviceEnumerator>::CoCreateInstance(const _GUID & classUUID, unsigned long dwClsContext) Ligne 92 + 0x21 octets C++
MidiTest.exe!juce::WasapiClasses::WASAPIAudioIODeviceType::scan(juce::StringArray & outputDeviceNames, juce::StringArray & inputDeviceNames, juce::StringArray & outputDeviceIds, juce::StringArray & inputDeviceIds) Ligne 1355 + 0x12 octets C++
MidiTest.exe!juce::WasapiClasses::WASAPIAudioIODeviceType::scanForDevices() Ligne 1241 C++
MidiTest.exe!juce::AudioDeviceManager::scanDevicesIfNeeded() Ligne 323 + 0x1e octets C++
MidiTest.exe!juce::AudioDeviceManager::initialise(const int numInputChannelsNeeded, const int numOutputChannelsNeeded, const juce::XmlElement * const e, const bool selectDefaultDeviceOnFailure, const juce::String & preferredDefaultDeviceName, const juce::AudioDeviceManager::AudioDeviceSetup * preferredSetupOptions) Ligne 191 C++
The two first lines of my main throwing this assertion :
AudioDeviceManager audioManager; audioManager.initialise(1, 1, nullptr, true);
Thanks in advance for your help !