Re: Programmatic Aggregate Device issue on Intel Mac, not always completing initialisation?
Re: Programmatic Aggregate Device issue on Intel Mac, not always completing initialisation?
- Subject: Re: Programmatic Aggregate Device issue on Intel Mac, not always completing initialisation?
- From: Jeff Moore <email@hidden>
- Date: Wed, 09 Jul 2008 11:54:08 -0700
'!size' == kAudioHardwareBadPropertySizeError
This means that you aren't passing the proper size to the property. It
appears that the reason why is that you didn't notice that the value
of kAudioHardwarePropertyDeviceForUID is actually an
AudioValueTranslation structure:
from <CoreAudio/AudioHardware.h>:
@constant kAudioHardwarePropertyDeviceForUID
Using an AudioValueTranslation structure,
this property translates the input
CFStringRef containing a UID into the
AudioDeviceID that refers to the
AudioDevice with that UID. This property will
return kAudioDeviceUnknown if
the given UID does not match any currently
available AudioDevice.
On Jul 9, 2008, at 8:29 AM, Dan Stowell wrote:
OK, thanks. I added the following to the above code, at the point
marked "point at which to add the delay":
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.1, false);
address.mSelector = kAudioHardwarePropertyDeviceForUID;
err = AudioObjectGetPropertyData(coreaudioPlugin, &address,
sizeof(CFStringRef), CFSTR("SCAggregate"), &aggregateSize,
&aggregateID);
if (err != kAudioHardwareNoError)
{
scprintf("get kAudioHardwarePropertyDeviceForUID error %s\n",
(char*)&err);
return false;
}
It results in the following error in all configurations:
get kAudioHardwarePropertyDeviceForUID error ?ohw
so I guess I'm doing something wrong...? Thanks for any further
advice.
As it's name implies, kAudioHardwarePropertyDeviceForUID is a
property of
the system object, not the plug-in object. That's why you are
getting the
error here.
Thanks. Sorry to be dense, but I used "kAudioObjectSystemObject"
instead of "coreaudioPlugin" in the above and it must not be right
because it doesn't work - produces error "zis!". Does it need to be
written differently than:
err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &address,
sizeof(CFStringRef), CFSTR("SCAggregate"),
&aggregateSize, &aggregateID);
--
Jeff Moore
Core Audio
Apple
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden