Re: Trouble setting sub device list, with a private aggregate device (on Tiger)
Re: Trouble setting sub device list, with a private aggregate device (on Tiger)
- Subject: Re: Trouble setting sub device list, with a private aggregate device (on Tiger)
- From: Jeff Moore <email@hidden>
- Date: Wed, 28 Oct 2009 09:32:47 -0700
On Oct 28, 2009, at 2:32 AM, Stéphane Letz wrote:
---
Message: 12
Date: Tue, 27 Oct 2009 09:11:46 -0700
From: Jeff Moore <email@hidden>
Subject: Re: Trouble setting sub device list, with a private
aggregate
device (on Tiger)
To: CoreAudio API <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=iso-8859-1; format=flowed;
delsp=yes
Yes. It's always a good idea to filter the devices to be sure they
can
be aggregated before trying to put them in an aggregate. The HAL
should be fine even if you don't. It should just ignore any non-
aggregatable devices.
That said, the general criteria for devices that can be aggregated is
that the owning plug-in of the device is the IOAudio plug-in (aka the
plug-in with the bundle ID of "com.apple.audio.CoreAudio") and that
the object's class is kAudioDeviceClassID.
I don't get that....
I have the following code to the the PluginID of the
"com.apple.audio.CoreAudio" IB but then??
osErr = AudioHardwareGetPropertyInfo
(kAudioHardwarePropertyPlugInForBundleID, &outSize, &outWritable);
if (osErr != noErr) {
jack_error("JackCoreAudioDriver::CreateAggregateDevice :
AudioHardwareGetPropertyInfo kAudioHardwarePropertyPlugInForBundleID
error");
printError(osErr);
return osErr;
}
AudioValueTranslation pluginAVT;
CFStringRef inBundleRef = CFSTR("com.apple.audio.CoreAudio");
pluginAVT.mInputData = &inBundleRef;
pluginAVT.mInputDataSize = sizeof(inBundleRef);
pluginAVT.mOutputData = &fPluginID;
pluginAVT.mOutputDataSize = sizeof(fPluginID);
osErr = AudioHardwareGetProperty
(kAudioHardwarePropertyPlugInForBundleID, &outSize, &pluginAVT);
if (osErr != noErr) {
jack_error("JackCoreAudioDriver::CreateAggregateDevice :
AudioHardwareGetProperty kAudioHardwarePropertyPlugInForBundleID
error");
printError(osErr);
return osErr;
}
The owning plug-in ID of an AudioObject is accessed via the property,
kAudioObjectPropertyCreator. This returns the bundle ID of the plug-in
that created the AudioObject. For a device to be aggregatable, this
value needs to be the bundle ID of the IOAudio plug-in, which as I
said is "com.apple.audio.CoreAudio". Any other value for this property
means that the device is not aggregatable.
Another question : what is the recommended way to know if a device
is a "built in" device?
Is the kAudioDeviceTransportTypeBuiltIn property for that purpose?
Indeed it is.
--
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