Re: Linking together audio units
Re: Linking together audio units
- Subject: Re: Linking together audio units
- From: Bill Stewart <email@hidden>
- Date: Tue, 2 Oct 2001 12:38:09 -0700
On Tuesday, October 2, 2001, at 08:01 AM, Robert Grant wrote:
I'm not an Apple employee, I just play one.... :-)
Brian,
It looks like you should be using the AUGraph stuff to
wire your AUs together. Have you looked into that?
I've been trying similar things to you and certainly haven't
had any of the successes you've had!
So - I think the basic problem is that you shouldn't have an
OutputUnit as Unit A
An AUGraph will only expect a *single* output unit - it is the head
of the graph and is responsible for pulling on the graph of its
input connections.
You're InputCallback should be supplied to the reverb unit - which
will expect interleaved floats in a single stream
Youv'e really got two signal chains:
Chain 1:
OutputUnit
Chain 2:
Reverb
|
OutputUnit
The Output units we ship will output their data to an AudioDevice.
Trying to connect them up as inputs to another audio unit will lead
to *undefined* behaviour...'
Bill
Also how are you triggering your sample to play? It seems
to me that your AUs are sample playback nusic devices and should
be triggered by MIDI Note On/Note Off events rather than
AU start (which I thought was only supported by the AudioOutputUnit?
I hope that helps??
Robert.
----- Original Message -----
From: "Brian Barnes" <email@hidden>
To: <email@hidden>
Sent: Tuesday, October 02, 2001 1:17 AM
Subject: Linking together audio units
Bill, Chris ... anybody else with @apple (!!!) ...
My questions are becoming more intelligent, I'm starting to feel
my way
into this. Now I want to link audio units together. Say, I want
to add
an effect to a sample playing.
So far, this is what I think (by the docs) should be the setup.
I have
3 audio units.
Audio Unit A
------------------
type: kAudioUnitComponentType
subtype: kAudioUnitSubType_Output
opened by:
OpenDefaultComponent(kAudioUnitComponentType,kAudioUnitSubType_Output);
Audio Unit B
------------------
type: kAudioUnitComponentType
subtype: kAudioUnitSubType_Effect
opened by:
compdesc.componentType=kAudioUnitComponentType;
compdesc.componentSubType=kAudioUnitSubType_Effect;
compdesc.componentManufacturer=kAudioUnitID_MatrixReverb;
compdesc.componentFlags=0;
compdesc.componentFlagsMask=0;
compid=FindNextComponent(NULL,&compdesc);
au=(AudioUnit)OpenComponent(compid);
Audio Unit C
------------------
type: kAudioUnitComponentType
subtype: kAudioUnitSubType_Output
opened by:
OpenDefaultComponent(kAudioUnitComponentType,kAudioUnitSubType_Output);
I hookup input to A by setting the property
kAudioUnitProperty_SetInputCallback. If I leave it at that, it works
fine, and plays the sample.
Next, I kAudioUnitProperty_MakeConnection to hookup the input of
Unit B
from Unit A.
Then another kAudioUnitProperty_MakeConnection to hookup the input of
Unit C from Unit B.
I'm not sure what sourceOutputNumber and destInputNumber are, so I set
them to zero. I have a single input/output, so I'm guessing this will
be OK.
I call AudioOutputUnitStart on both A and C, and I get a sample that
plays twice as fast!
So what am I doing wrong here?
[>] Brian
_______________________________________________
coreaudio-api mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
_______________________________________________
coreaudio-api mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
Cat: "Leave me alone, I'm trying to nap... Ah, What's that clicking
noise?"
__________________________________________________________________________