Re: Host callback
Re: Host callback
- Subject: Re: Host callback
- From: Pavol Markovic <email@hidden>
- Date: Thu, 3 Mar 2005 00:37:32 +0100
Hi Ralph,
here's example. The only relevant place/frequency to call callback
functions is in render/process thread, max once per render call (you
don't have to call it for every single frame, because the number of
frames to render are passed as parameter into render method/function)
... somewhere in render/process call stack...
bool haveSamplePos = false;
Float64 outCurrentSampleInTimeLine;
if ( IsTransportStateProcSafe() &&
mHostCallbackInfo.transportStateProc )
{
OSStatus result =
mHostCallbackInfo.transportStateProc(mHostCallbackInfo.hostUserData,
NULL, NULL, &outCurrentSampleInTimeLine, NULL, NULL, NULL);
if ( result == noErr )
{
haveSamplePos = true;
}
}
Please note, that currently very few hosts provide this info and older
versions of GarageBand and Logic may crash when tryin' to call this.
Find e-mail thread "TransportState Logic/GarageBand workaround" in
archives (8/18/2004).
Best,
Pavol Markovic
On Mar 2, 2005, at 11:58 PM, email@hidden wrote:
Hello,
I need my unit to be aware of host transport state every time it
renders a frame or so.
I've been trying to use CallHostTransportState(&...); but I am still
unsure where (and exactly how) to use it.
A code example would be highly appreciated, say for instance inside
"Turning up the volume with AUs" sample.
Thanks,
Ralph
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
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