Re: Did GarageBand stop playing?
Re: Did GarageBand stop playing?
- Subject: Re: Did GarageBand stop playing?
- From: Olivier Tristan <email@hidden>
- Date: Tue, 24 Jan 2006 17:33:40 +0100
kelly jacklin wrote:
On Jan 24, 2006, at 6:20 AM, Daniel Jalkut wrote:
I'm writing an AudioUnit software instrument specifically targeted
at GarageBand. I want to show in my configuration UI whether the
unit is currently "running" or not - specifically, whether
GarageBand is playing or not (I realize it may be an inappropriate
assumption that the two are the same).
It seems that I get initialized when I'm set as the generator for a
given track. After that, I get "Render" calls repeatedly while
GarageBand is playing, but I can't figure out whether "that was the
last one." I want this functionality to work whether my track is
currently processing MIDI input or not.
Any pointers on how I can reliably detect that I'm "not getting
Render calls anymore" - aside from installing my own timer and
assuming a certain delay means GB stopped?
Hey Daniel,
Check out HostCallback_GetTransportState in AudioUnitProperties.h and
here:
<file:///Developer/Examples/CoreAudio/Documentation/AudioUnits/
Topics/au_properties.html#HostCallbacks-MusicalTime>
It has a boolean indicating whether or not the transport is currently
running. I do not know for sure whether GB supports this currently,
but what you want is what it's intended for, so it's worth a try.
I know there have been issues in the past with Logic incorrectly
filling in the HostCallbackInfo structure with garbage for the
callbacks it didn't know about (which this one is), but I do not know
if this applies to GB. See the archives for (IIRC) Marc Poirier's
excellent discussion of how to detect whether you can trust this
callback when running under Logic, and indeed how to detect if you
are running under Logic to know whether you need to worry about it.
This may all be moot nowadays, or you may not care if this is just
for your own use in GB...
Daniel want to know if process is being called not if the transport bar
is currently playing, which is as far as I know not possible.
As you've suggested, the best way would be to use a timer, especially if
you plan to support other plugin format.
I'll be really interessted to learn other way to do this, so don't hesitate.
Thanks,
Regards,
--
Olivier Tristan
Ultimate Sound Bank
_______________________________________________
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