• 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: HostCallback_GetBeatAndTempo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HostCallback_GetBeatAndTempo


  • Subject: Re: HostCallback_GetBeatAndTempo
  • From: William Stewart <email@hidden>
  • Date: Mon, 12 Jun 2006 11:18:28 -0700

We've previously commented on this, so there "has been a ruling" :-)

The host callbacks are provided to obtain additional timing information about the current buffer that an AU is being asked to render. To take an example, the host asks an AU to render, and then the AU turns around and asks the host - what is the current beat for the audio I am being asked to render (the beat and tempo callback).

It makes no sense for an AU to make this call outside of its render call, as its can't provide any context to the host. For instance, some audio engines render some of their tracks ahead of time (and some will also only call an AU when it actually has work to do) - that is, ahead of the "now". So, if an AU arbitrarily asks for the current beat (lets say from its UI) - which "current beat" does it want - the time now (when it might not even be rendering), or the "next time" it will be asked to render, etc...

To be clear about what we expect the host to provide during these callbacks, we expect them only to be called from within the render call.

Now, one of the reasons some AUs were calling these callbacks outside of the render call, was to try to glean information about the current song from the host. For instance, some AUs would like to know what the tempo range of the song is (for example, the slowest and fastest tempo in use). We're considering how best to provide this information, and it would help us to know what kind of general information about a song that an AU could use - so if you've idea's or suggestions here, please post them to this list.

Thanks

Bill

On 11/06/2006, at 9:33 PM, Angus F. Hewlett wrote:

Hi Earl,

From the crash log, it looks like you're calling the beat-and-tempo proc from your UI thread. DP doesn't like that.

I'm not sure if there's been a ruling from the AU team as to whether it's legal to call that callback from anywhere other than your render method.. it doesn't really make sense to do so (as "current song position" has no meaning in any other context), but OTOH it's not nice of DP to crash if you do.

Workaround:- call the callback only from your render method; cache the values returned if you need to display them on your UI.

Best regards,
      Angus.


Earl Vickers wrote:
Olivier Tristan wrote:

Concerning the debug problem, you just need to edit the custom target
(Get Info) and put the full path to DP executable
like /Contents/MacOS/Digital Performer there not just path to the bundle
Hope this helps.

Indeed it does, thanks!!

What I'm finding now is that when I instantiate the plug-in, the debugger console says:

    Plugin Mas Audio Unit Support file 'MasAUSupportEffect.cpp', Line
    259: ASSERT( context != kRegionOpProcContext ) failed


Then it seems to work okay, including the GetBeatAndTempo callbacks, but when I close the plug-in, the debugger hangs. Eventually it unlocks, but when I instantiate the plug-in again, the debugger stops in the middle of MasAUSupportProc::GetBeatAndTempo and says:


    GDB: Program received signal: "EXC_BAD_ACCESS".


Is it possible that as I close the plug-in, the callback is still being processed, and then when the callback returns, there's no plug-in to return to? So this is some kind of thread thing?


Earl
--
The Sound Guy, Inc.
http://www.sfxmachine.com
--------------------------------------------------------------------- ---


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40fxpansion.com


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

--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __


_______________________________________________
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: HostCallback_GetBeatAndTempo (From: Earl Vickers <email@hidden>)
 >Re: HostCallback_GetBeatAndTempo (From: "Angus F. Hewlett" <email@hidden>)

  • Prev by Date: Re: Audio/Video synchronization
  • Next by Date: Re: Bug in PlayFile.cpp
  • Previous by thread: Re: HostCallback_GetBeatAndTempo
  • Next by thread: Simple CoreAudio examples in "Simple SDK"
  • Index(es):
    • Date
    • Thread