Re: Setting an aggregate device to appear to be stereo
Re: Setting an aggregate device to appear to be stereo
- Subject: Re: Setting an aggregate device to appear to be stereo
- From: William Stewart <email@hidden>
- Date: Fri, 4 Aug 2006 17:02:21 -0700
Aggregate Devices render a service to "aggregate" (join) multiple
devices into 1.
What you are wanting to do is to make a virtual device which only
publishes some of the channels of this device. This is not a
currently supported feature - I'm not sure that we would support this
either - we really expect applications to deal with devices as they
appear to them.
Bill
On 03/08/2006, at 6:22 AM, Dave Addey wrote:
Hi all,
I’m trying to use aggregate devices to make a stereo “wrapper”
device from a real multi-channel device.
My problem is that I don’t know how to make the aggregate device
appear to only have two channels. I’m testing with a 6-channel
eMagic EMI 2:6. When I first create the aggregate device, using
just the EMI 2:6, it correctly reports an AudioChannelLayout with
mChannelLayoutTag = kAudioChannelLayoutTag_UseChannelDescriptions,
and it has six channel descriptions, all set to
kAudioChannelLabel_Unknown.
I’ve been trying to set a new value of
kAudioDevicePropertyPreferredChannelLayout on the aggregate device,
with a layout tag of kAudioChannelLayoutTag_Stereo, on the
assumption that I can then set
kAudioDevicePropertyPreferredChannelsForStereo to choose the two
channels I want to use. I’m also assuming that the aggregate
device will then “be” stereo. Here’s the code I’m using:
// create a new ACL for stereo
AudioChannelLayout newACL;
newACL.mChannelLayoutTag = kAudioChannelLayoutTag_Stereo;
// set the new ACL on the aggregate device
osErr = AudioDeviceSetProperty(outAggregateDevice, NULL, 0,
false, kAudioDevicePropertyPreferredChannelLayout, sizeof(newACL),
&newACL);
if (osErr != noErr) {
printf("AudioDeviceSetProperty returned %i\n", osErr);
return osErr;
}
Whenever I try this, AudioDeviceSetProperty returns “!siz”, so
there must be something up with the size of this new ACL. It’s
certainly smaller in size than the existing one (which has six
channel descriptions), but that’s to be expected. Any idea what
I’m doing wrong? Is this the right way to make an aggregate device
appear to be stereo, even if it is not?
In case you’re wondering, I’m doing this to wrap a multichannel
device in a stereo “aggregate” device, so that I can pass the
stereo device to QuickTime and get the benefit of
kRenderQuality_Medium when using QuickTime’s new pitch-fixing
abilities. Unfortunately, kRenderQuality_Medium isn’t available
for anything more than a stereo device mix right now.
Any help much appreciated!
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
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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