• 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: Joseph Toscano <email@hidden>
  • Date: Sun, 23 Mar 2008 11:14:15 -0400

Chris,

Thanks for the tip! Calling CallHostBeatAndTempo() inside Render() works fine.

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

On Mar 22, 2008, at 9:25 PM, Chris Bennett wrote:

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

_______________________________________________ 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
References: 
 >Re: AU Question: Host Tempo Callback (From: Chris Bennett <email@hidden>)

  • Prev by Date: Re: AudioUnitScheduleParameters causing complete audio cutout
  • Next by Date: Re: [FAQ?] re>x-code template project for AU with cocoa view
  • Previous by thread: Re: AU Question: Host Tempo Callback
  • Next by thread: Getting audiofile to recognize third-party codecs
  • Index(es):
    • Date
    • Thread