Re: How To Get Idle Time to the edit and view components?
Re: How To Get Idle Time to the edit and view components?
- Subject: Re: How To Get Idle Time to the edit and view components?
- From: Bill Stewart <email@hidden>
- Date: Wed, 4 Jun 2003 10:18:07 -0700
I guess I should add some comments...
We'd thought about adding a generic property for idling usage - mainly
because some idle tasks may involve some work (like lots of fft's for a
spectral display) that the user may not want to always take the full
cost of... I guess part of the motivation for doing this was that host
apps could have a "generic" way to handle this kind of cost for their
users...
After some to and fro of this, we decided not to do anything. Why? 2
reasons:
(1) Its not needed - with run loops, idle timers, etc, you can install
your own handlers quite easily to do this kind of work. the concept of
explicit idling being provided by the host is a hangover I think from
the "classic" mac model where there isn't any real threading support
(2) We don't believe that we could publish a property that would make
much sense for the host to manage this... Given that any AU that is
going to be doing this kind of extensive work will have its own UI -
(and I would hope if there is additional work that is done for the UI
that the AU gets told by its UI that its been created/displayed - so
should do that work!:-) )... Given that it does have its own UI, I
think its up to that UI to do this kind of resource management if it
makes sense for the UI/AU itself... (Often the display is done with
data that is already calculated by the AU so there may not be much if
anything to gain by providing this to the user)...
Bill
On Wednesday, June 4, 2003, at 04:45 AM, Urs Heckmann wrote:
Am Mittwoch, 04.06.03, um 11:30 Uhr (Europe/Berlin) schrieb Shai
Shasag:
Eric has recently asked: How To Give Idle Time From The AU To The
Host ?
I would like to add the question of how to get idle time for the view
and edit component?
In the pre-carbon even model, we used to have an idle even, which I
can no longer find in the carbon evens. Another option would be to
install an idle timer - but method can have it's problems.
I guess you ask about an equivalent for VST's idle() method. - I think
the recommended way isn't installing an idle timer but a RunLoopTimer.
The idle timer often doesn't get called, i.e. during user interaction.
The RunLoopTimer gets called anyway.
In my gui stuff I do this, works quite well so far:
InstallEventLoopTimer( GetCurrentEventLoop(), 0,
kEventDurationMillisecond * 50, NewEventLoopTimerUPP( TimerProc ),
this, &timer );
(this = my control dispatch object, TimerProc = C callback that
distributes time to my control objects)
HTH,
;) Urs
urs heckmann
email@hidden
www.u-he.com
2b | ! 2b
_______________________________________________
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
________________________________________________________________________
__
"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
________________________________________________________________________
__
_______________________________________________
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.