• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Host callback
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Host callback


  • Subject: Re: Host callback
  • From: Howard Moon <email@hidden>
  • Date: Thu, 3 Mar 2005 07:10:19 -0800

Hi all,

I thought I'd better chime in here about the specific example given below:

On Mar 2, 2005, at 3:37 PM, Pavol Markovic wrote:

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);

Unfortunately, neither Logic nor Digital Performer currently give valid information for the outCurrentSampleInTimeLine parameter. You'll just get the value 0 for that. Other information should be valid, but the time in samples may not be, depending on the host. This has been a major headache for our software. It's strange that the callback was implemented, but the proper setting of one of the parameters left out. For hosts that give us 0 in that parameter, we're relying on the (potentially much less reliable) time information in the Render call.


    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).


Quite so. But you'd think that once a host (esp. one that Apple owns!) added the callback support, they'd add *all* the information it purports to support. (The only AU host I have that supports the time info is Metro. At least *someone* got it right! :-))


-Howard

_______________________________________________
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


  • Follow-Ups:
    • Re: Host callback
      • From: William Stewart <email@hidden>
References: 
 >Host callback (From: email@hidden)
 >Re: Host callback (From: Pavol Markovic <email@hidden>)

  • Prev by Date: AudioUnitReset and MusicDevice - very common bug
  • Next by Date: Re: Host callback
  • Previous by thread: Re: Host callback
  • Next by thread: Re: Host callback
  • Index(es):
    • Date
    • Thread