Setting the AudioChannelLayout for an aggregate output device
Setting the AudioChannelLayout for an aggregate output device
- Subject: Setting the AudioChannelLayout for an aggregate output device
- From: Dave Addey <email@hidden>
- Date: Wed, 30 Jan 2008 20:43:21 +0000
- Thread-topic: Setting the AudioChannelLayout for an aggregate output device
Title: Setting the AudioChannelLayout for an aggregate output device
Hi there,
I’m trying to set the audio channel layout of an aggregate output device via code, and as yet I can’t work out how to do so.
Whenever I create a new aggregate device with a never-before-used name, it reports a preferred channel layout of the correct number of channels, each with a channel label of kAudioChannelLabel_Unknown. I can change this via Audio MIDI Setup, but ideally I want to do this behind the scenes since it is a custom aggregate device being created (and destroyed) for one application’s needs.
I have tried creating an audio unit of subtype kAudioUnitSubType_HALOutput, setting its current device to be the aggregate device, and then trying the kAudioUnitProperty_AudioChannelLayout property, but I get an error whenever I try and get or set this property for the output scope of the audio unit. (I can’t set it for the input scope either).
I can see why normally you wouldn’t want code to mess with a device’s layout, but in the case of an aggregate device it would be very handy. Is this possible to do without resorting to Audio MIDI Setup? If AMS can do it, can we do so too?
(One other note: if I create another aggregate device with the same name, it seems to inherit the audio channel layout from the last time an aggregate with that name was created. Is this deliberate?)
Dave.
_______________________________________________
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