• 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: AU Question: Host Tempo Callback
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AU Question: Host Tempo Callback


  • Subject: Re: AU Question: Host Tempo Callback
  • From: Chris Bennett <email@hidden>
  • Date: Sat, 22 Mar 2008 21:25:55 -0400

Hi Joseph

Well, I am using CallHostBeatAndTempo() in one of my projects, and I override Render() and make the call from there -- this is a member function, so you should have access to all of your private variables in your AU with no problem.  There is also the added advantage that it is called every slice, rather than every frame or sample, so the computational load is trivial, but you still have accuracy within a few ms normally to potential changes in tempo made by the host.  I am not sure if this would solve your problems, but maybe :-)

Best
~cb
http://oygosound.org


On Mar 22, 2008, at 3:02 PM, email@hidden wrote:

Hello,

I'm writing an 'aufx' AU subclassed from AUEffectBase. Thus, I am also  
subclassing AUKernelBase and implementing my own Process() method.

I'm able to get information from the host such as sample rate (by  
using GetSampleRate(), defined in the AUKernelBase class), but I am  
unable to get the host's tempo by using CallHostBeatAndTempo(),  
defined in the AUBase class.

I am calling both of these methods from within my AUKernelBase  
subclass, inside the Process() method. The actual code being used for  
CallHostBeatAndTemp() is as follows:

Float64 beat, tempo;
OSResult result = mAudioUnit->CallHostBeatAndTempo(&beat, &tempo);

Where mAudioUnit is defined in AUKernelBase as the AUEffectBase object  
which contains the kernel. Unfortunately, this operation always  
returns a value of -1, which (according to AUBase.h) indicates that no  
callback exists in the host application for retrieving this specific  
information (tempo, etc). As such, the values stored in the variables  
"beat" and "tempo" ending up being 0.0.

I have tried this AU inside two hosts: AU Lab, and Logic Pro 8. Both  
situations yield the same result.

Any help on this matter would be greatly appreciated!

--JT
http://zhaymusic.com/
http://virheroicus.com/

 _______________________________________________
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: AU Question: Host Tempo Callback
      • From: Joseph Toscano <email@hidden>
    • Re: AU Question: Host Tempo Callback
      • From: Brian Willoughby <email@hidden>
  • Prev by Date: Re: AudioQueue and buffer underflows
  • Next by Date: Re: AU Question: Host Tempo Callback
  • Previous by thread: AU Question: Host Tempo Callback
  • Next by thread: Re: AU Question: Host Tempo Callback
  • Index(es):
    • Date
    • Thread