I do the following and it seems to work. I
don't have a Digi 003, but I have tested this with the Griffin iMic, the NAD
PP-3 (aka USB Audio CODEC), a $10 USB Skype phone and JackOSX (which is
software). I poll for changes, rather than register a
callback (tsk, tsk).
// Return a list of installed audio devices. Caller
must free. static AudioDeviceID *get_device_list (int
*device_count) { UInt32 nbytes;
OSStatus status = AudioHardwareGetPropertyInfo (kAudioHardwarePropertyDevices,
&nbytes, NULL); assert (status ==
noErr); *device_count = nbytes / sizeof
(AudioDeviceID); // printf ("%d audio devices found\n",
*device_count); AudioDeviceID *device_list =
(AudioDeviceID *) malloc (nbytes); status =
AudioHardwareGetProperty (kAudioHardwarePropertyDevices, &nbytes,
device_list); assert (status ==
noErr); return device_list; }
If your code looks similar, it might be an issue specific
to the Digi. Download JackOSX and try it with that (the JackRouter
'device' comes and goes when you start and stop the Jack server).
HTH - Paul
Sanders.
----- Original Message -----
Sent: Monday, March 15, 2010 5:48 PM
Subject: Audio devices not updating
I'm writing what I hoped would be a simple program that puts a menu in the
status bar that allows me to quickly set the default system output device.
However, the list of available output devices is not updating. I am developing
on a new iMac and switching between the computer's speakers and a Digi 003
rack.
...
|