Re: MakeConnection Question
Re: MakeConnection Question
- Subject: Re: MakeConnection Question
- From: William Stewart <email@hidden>
- Date: Thu, 10 Aug 2006 12:39:50 -0700
On 10/08/2006, at 8:41 AM, Mark Thomas wrote:
Hi,
I'm slowly learning my way around using CoreAudio (got my first
audio
playing but straight to default output audit), so now I'm trying to
use
MakeConnection for connecting AudioUnit's together (DefaultOutput,
Stereo
mixer & format Convert), so digging around the maillists and doc's
I found
some like :-
conn.sourceAudioUnit = theAudioConverterUnit;
conn.sourceOutputNumber = 0;
conn.destInputNumber = 0;
AudioUnitSetProperty(theMixerUnit,
kAudioUnitProperty_MakeConnection,
kAudioUnitScope_Input,
0,
&conn,
sizeof(conn));
I understand that 'sourceOutputNumber', is the output from
'sourceAudioUnit' and 'destInputNumber' is input to my theMixerUnit,
yes - that's the input you are connecting too.
So, a mixer has 64 inputs, you are nominating which one of these to
connect too (0 to 63).
But what is the 'InElement' parameter of AudioUnitSetProperty
for ? Is
that always the same as 'destInputNumber' ?
Yes
I'm also trying to work out how do you find how many input and
output
channels
They aren't channels, they are elements:
Input (or Output or Global) is a scope. Scopes contain an ordered
collection of elements - there's a GetElementCount property. We often
refer to input and output elements as buses. Each input or output
element (bus) has a format of the data it passes - primarily some
number of channels and a sample rate.
Have a look at the output of the auval tool for say the 'aufx bpas
appl' unit (an effect) compared with say 'aumx smxr appl' (the stereo
mixer)
Bill
a particular AudioUnit's have, as the I cannot see this from the
headers or doc's yet, but maybe I'm looking in the wrong place ?,
so thing
the code is more like
AudioUnitSetProperty(theMixerUnit,
kAudioUnitProperty_MakeConnection,
kAudioUnitScope_Input,
conn.destInputNumber,
&conn,
sizeof(conn));
Is my thinking correct ?
I understand there's an AUGraph but I'm trying to learn CoreAudio
from the
basic's and building up from that.
Thanks for any help
Mark.
_______________________________________________
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