Re: AU Process/View relationship
Re: AU Process/View relationship
- Subject: Re: AU Process/View relationship
- From: William Stewart <email@hidden>
- Date: Wed, 5 Oct 2005 11:19:17 -0700
John,
On 04/10/2005, at 10:24 PM, john smith wrote:
Hi,
I have a question regarding AU processes and views, which I would
very much appreciate someone from Apple giving an (official) reply to.
The question is, what is the relationship between processes and
views. What I'm getting at is, can it be many-to-one (many views
attached to one process), or will there always be max. 1 view
attached to a process?
Many to one. You can see this in the AU Lab application (/Developer/
Applications/Audio/) - if you make an effect by default it opens a
single view. Option-Click on the effect name and you'll get another
view - you can keep making these to your heart's content. You could
have one window being a custom view, the other a generic slider view.
This is where the AudioUnitEventListener API is used - to notify
changes to the AU's parameters, etc... Try this:
Open two generic views to any AU
Move a slider in one view
As you change this, you should see two things occuring in the other
view:
(1) The slider's background turns blue
(2) It changes its value to track the change
The "turning blue" is a response to the begin/end gesture
notification that the cocoa view sends when the user click DOWN on
the slider (then releases). If you don't see this response from a
custom view, then that view should be fixed - it means its not
issuing the begin/end gesture notification.
I know this may sound like a stupid question, but really it isn't.
It has to do with the dataflow, whether certain information should
flow from view -> process, or it should flow from view -> process -
> all views.
Sure - but also bare this in mind.
We have made NO ASSUMPTION that the AU and its view are the same
piece of code; in fact we deliberately designed a strong separation
between these two. Ideally, you should not assume that the au and its
view are:
(1) Running in the same address space
(2) Running on the same machine
This has ramifications for how you pass data between the two - do not
pass pointers as values - ie, you have to pass the data not a pointer
to it
We've had numerous discussions on this in the past, so there are
probably some additional comments/observations in the list's archives.
Bill
--
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