Re: Device Sync (was Re: Multiple HALAOUs don't get along?)
Re: Device Sync (was Re: Multiple HALAOUs don't get along?)
- Subject: Re: Device Sync (was Re: Multiple HALAOUs don't get along?)
- From: William Stewart <email@hidden>
- Date: Thu, 17 Jun 2004 17:59:00 -0700
On 17/06/2004, at 12:50 AM, Dave Addey wrote:
>
Hi Bill,
>
>
Not sure I'm understanding this correctly, but this has worried me
>
slightly
>
due to a piece of work I'm about to start...
>
>
I'm planning to have a MatrixMixer, with four inputs, and two outputs
>
(each
>
of which is an AUHAL). Ideally, these two outputs will be separate
>
AUHALs
>
and will point to different physical devices. The whole thing will be
>
tied
>
together with an AUGraph to manage the connections.
>
>
Am I only allowed one AUHAL in my entire graph in this situation? Or
>
is it
>
only a problem if I'm connecting the AUHAL units to each other (which I
>
wouldn't be)?
one per graph... the comments below should also make it clear why you
can't directly connect one AUHAL (on one device) with another AUHAL on
another device.
What you'd end up having to do is have an AUGraph with all of your AU's
for output - then at the top, have a callback from your input to the
input matrix mixer that reads from the data you get from the other
AUHAL which is your input...
We're looking at doing some sample code now that will have this
basically working - don't know how long it will take us to make this
available, but we're prioritising it
Bill
>
>
Dave.
>
>
> From: William Stewart <email@hidden>
>
> Date: Wed, 16 Jun 2004 16:53:23 -0700
>
> To: David Duncan <email@hidden>
>
> Cc: CoreAudio API <email@hidden>, Chilton Webb
>
> <email@hidden>
>
> Subject: Re: Device Sync (was Re: Multiple HALAOUs don't get along?)
>
>
>
> On 16/06/2004, at 4:33 PM, David Duncan wrote:
>
>
>
>> On Jun 16, 2004, at 05:25 PM, William Stewart wrote:
>
>>
>
>>> No - As Robert stated, he's doing this just fine.
>
>>
>
>> I think the key difference here is that Robert is gluing the 2nd
>
>> AUHAL
>
>> into the AUGraph (because you can only have one output unit in an
>
>> AUGraph). Since Chilton is not using AUGraph, he is simply using the
>
>> connection properties to paste the AUs together via the
>
>> kAudioUnitProperty_MakeConnection property. Thus OutputUnit pulls
>
>> from
>
>> FilterUnit pulls from InputUnit (where InputUnit & OutputUnit are
>
>> both AUHAL units and FilterUnit is an effect unit). This specific
>
>> configuration doesn't appear to work. The same exact code works just
>
>> fine if you have the OutputUnit pull from the FilterUnit pull from
>
>> the
>
>> OutputUnit. Somehow this seems like a bug to me.
>
>
>
> No - basic misunderstanding.
>
>
>
> If you have one (or two) AUHAL units pointing at the same device, then
>
> you can make a connection between them just fine.
>
>
>
> If you have one AUHAL looking at one device, and a second one at
>
> another device then you can't. Why? Because each AUHAL is going to run
>
> in its own thread (the I/O Proc of the device). The only time you can
>
> call AudioUnitRender - for input - is in the ****same**** thread as
>
> its
>
> I/O Proc. That is why you have this property to notify you that input
>
> has arrived... when you get that notification you call AudioUnitRender
>
> (you are running in the I/O proc for that device when this
>
> notification
>
> is called).
>
>
>
> You can't connect two up from different devices, because the output
>
> side is going to call in its I/O proc - if its connected it calls for
>
> input, but you aren't on the right thread (you're on the thread for
>
> the
>
> output device, not the input device) - so you don't get anything back.
>
>
>
> I think this is explained in the tech note - if its not, then please
>
> let us know and we'll update it.
>
>
>
> Bill - I hear the sound of a thousand feet chasing me :-)
>
>
>
>>
>
>> If you need more information then maybe Chilton can probably post
>
>> some
>
>> source code.
>
>>
>
>>> We're working up an extension to the existing sample code and will
>
>>> have
>
>>> that available as soon as we can.
>
>>
>
>> Great!
>
>> --
>
>> Reality is what, when you stop believing in it, doesn't go away.
>
>> Failure is not an option. It is a privilege reserved for those who
>
>> try.
>
>>
>
>> David Duncan
>
>>
>
>>
>
> --
>
> mailto:email@hidden
>
> tel: +1 408 974 4056
>
>
>
> ______________________________________________________________________
>
> __
>
> __
>
> Culture Ship Names:
>
> Ravished By The Sheer Implausibility Of That Last Statement [GSV]
>
> I said, I've Got A Big Stick [OU]
>
> Inappropiate Response [OU]
>
> Far Over The Borders Of Insanity And Still Accelerating [Eccentric]
>
> ______________________________________________________________________
>
> __
>
> __
>
> _______________________________________________
>
> coreaudio-api mailing list | email@hidden
>
> Help/Unsubscribe/Archives:
>
> http://www.lists.apple.com/mailman/listinfo/coreaudio-api
>
> Do not post admin requests to the list. They will be ignored.
>
_______________________________________________
>
coreaudio-api mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
>
Do not post admin requests to the list. They will be ignored.
>
>
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
Culture Ship Names:
Ravished By The Sheer Implausibility Of That Last Statement [GSV]
I said, I've Got A Big Stick [OU]
Inappropiate Response [OU]
Far Over The Borders Of Insanity And Still Accelerating [Eccentric]
________________________________________________________________________
__
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.