Device Polling: No such Device


#1

Hi, I’ve set up a thread to poll for device additions and I’ve essentially copied the code from the AudioDeviceSelectorComponent comboBoxChanged, but when I try to set the new device it always returns with No Such Device.

This is the code as I have it:

[code]AudioDeviceManager::AudioDeviceSetup config;
ae->deviceManager.getAudioDeviceSetup (config);

config.outputDeviceName = newDevice;
config.useDefaultOutputChannels = true;

String error = ae->deviceManager.setAudioDeviceSetup (config, true);[/code]

I’m using an Apogee Duet with Snow Leopard. I can’t see why it acts different. Any insight?

Thanks,
Graeme


#2

Presumably the name’s wrong. Easiest way to find out more is by debugging it and seeing what happens.


#3

haha, of course I’ve been debugging it! I only asked the question because I can’t see why in the debugger. The name comes up as “Duet (2835)” in both cases.

Would it happen to matter which thread attempts to change the setting? I tried setting up an async updater to do the change, but it didn’t seem to make a difference. It’s a bit of guess work on my part but I am trying before asking!


#4

Yeah, I don’t think the thread would make any difference. Not sure what else to suggest, really! Are you perhaps trying to open the same device more than once simultaneously? That should be possible, but maybe the driver wouldn’t cope with that situation.


#5

I guess it would make more sense to paste all of my code when looking for help.

Found the problem, I was doing this:

OwnedArray <AudioIODeviceType> types; ae->deviceManager.createAudioDeviceTypes (types);
When I should have been doing this: