Re: Audio Unit Presets and undo
Re: Audio Unit Presets and undo
- Subject: Re: Audio Unit Presets and undo
- From: William Stewart <email@hidden>
- Date: Thu, 7 Jun 2007 15:40:36 -0700
Have a look at the audio unit event listener - there's a tech note on
this (http://developer.apple.com/audio) - you can use this with the
object API to help to ensure that you don't get notified when you
change parameters and to find out when others do
Bill
On 07/06/2007, at 8:27 AM, Bjorn Roche wrote:
Hey all,
I am restructuring my code a bit to support native Audio Unit GUIs
and running into trouble with Presets, parameter list changes and
undo. Previously, when a parameter list or preset changed event was
fired, I always knew it was in response to something I did, so I
did not have to create a new edit object. Now that I'm adding
support for native GUIs, those events may be fired in response to
something I did, or in response to something the user did, like
select a new preset or changed a parameter in the native UI. This
means I must have some way to distinguish my events from UI
triggered events so that I can create an edit for UI triggered
events (otherwise undo won't work). Here's what I've tried:
when I restore a preset:
set flag
restore preset
unset flag
when responding to an event:
if flag is set
return
else
create an edit
but this doesn't work because, as far as I can tell, an extra event
gets fired later, after the flag is unset, meaning I'm unable to
distinguish between events that I initiated programatically and
events that were initiated by the UI. So, am I doing something
wrong to cause the extra event to fire? Is there some other
strategy I can use? I'm aware that I can listen to gesture begin
and gesture end events for parameters, but this is for properties.
Any hints appreciated,
bjorn
-----------------------------
Bjorn Roche
XO Wave
Digital Audio Production and Post-Production Software
http://www.xowave.com
http://blog.bjornroche.com
http://myspace.com/xowave
_______________________________________________
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