Initialize AudioDeviceManager always return "No such device"


#1

I wrote the following code:

AudioDeviceManager adm;
adm.setCurrentAudioDeviceType("ASIO", true);
cout << adm.initialise(2, 2, nullptr, true, "Yamaha*") << endl;

But it always outputs :“No such device: Yamaha Steinberg USB ASIO”

I’m pretty sure I have set up my sound card correctly, for it can work very well in other applications.
But why it can’t even initialize successfully?
I got pretty frustrated at this problem :sob:


#2

Hello ! Did you enable ASIO in the ProJucer ? Do you have the ASIO SDK Installed too ?


#3

Yes. I’ve done that.

And I tried:

adm.initialise(2, 2, nullptr, true);

to try to initialise with the default device.
It does return an empty string, but when I try:

adm.getCurrentAudioDevice();

I fount that this was a zero pointer……
I have no idea what had happened……
I think these two problems maybe have some connection, but I can’t figure out why……
Can you help me? thx~


#4

All right…
I added one line of code:

CoInitialize(0);

and everything’s fine…


#5

Hi Jerry, where did you add that?
I’m curious because we’ve had so many issues with ASIO drivers, and also the Yamaha/Steinberg one.


#6

At the beginning of the main() method.
I think this issue maybe have something to do with the COM in windows


#7

Browsing the juce ASIO code i dont see a CoInitialize() call. It should be there for every thread using COM. Just to sanity check, its in PortAudio ASIO and in juce WASAPI apis as well. So, looks like a juce bug to me.


#8

OK. I’ve fixed this on develop.


#9

Thnx, Fabian.
We’ll try ditching portaudio again.