BeatMaker 2のInterAppAudioのバグ

ただいまKQ MiniSynthにシーケンサーを組み込もうとしてるのですが、InterAppAudioをテストしているうちによそのアプリのバグを発見しました。

しかし、BeatMaker 2で試したところ、どうも「前のビートから現在のバッファまでのサンプル数」が返ってくるようです。


@typedef HostCallback_GetMusicalTimeLocation
@abstract Retrieve information about the musical time state of the host
If the host app has set this callback, then the audio unit can use this to obtain
information about the state of musical time in the host. The audio unit can call this
callback only from within the audio unit render call (otherwise the host is unable to
provide information accurately to the audio unit as the information obtained is relate to
the current AudioUnitRender call). If the host cannot provide the requested information, it
will return kAudioUnitErr_CannotDoInCurrentContext.

The AudioUnit can provide NULL for any of the requested parameters (except for
inHostUserData) if it is not interested in that particular piece of information

@param inHostUserData Must be provided by the audio unit when it makes this call. It is the client data provided by the host when it set the HostCallbacks property
@param outDeltaSampleOffsetToNextBeat The number of samples until the next whole beat from the start sample of the current rendering buffer
@param outTimeSig_Numerator The Numerator of the current time signature
@param outTimeSig_Denominator The Denominator of the current time signature (4 is a quarter note, etc)
@param outCurrentMeasureDownBeat The beat that corresponds to the downbeat (first beat) of the current measure that is being rendered

typedef OSStatus (*HostCallback_GetMusicalTimeLocation)(void * __nullable inHostUserData,
UInt32 * __nullable outDeltaSampleOffsetToNextBeat,
Float32 * __nullable outTimeSig_Numerator,
UInt32 * __nullable outTimeSig_Denominator,
Float64 * __nullable outCurrentMeasureDownBeat);