Re: AU HostCallback - musical location
Re: AU HostCallback - musical location
- Subject: Re: AU HostCallback - musical location
- From: Marc Poirier <email@hidden>
- Date: Sat, 28 Sep 2002 16:10:04 +0200 (CEST)
Hi. This looks great to me! It is all very clearly defined so that there
will (at least more likely) be no inconsistent implementations between
hosts and all the necessary information is there (at least everything that
I need for my projects). Many thanks for taking the time to rectify this
problem so swiftly.
One little point of ambiguity remains, though. "Beat" in beatAndTempoProc
is still not totally defined, although the meaning is much clearer now.
The only thing that might be ambiguous is what zero represents and if the
value ever resets. I am guessing that 0 would be at the start of the song
and that the value continues to increase throughout the song (I am
guessing this given the way that outCurrentMeasureDownBeat is defined),
but it could also be possible that beat resets to zero at the start of
each measure, so I think it would be worth explicitly spelling out the
expected behaviour in that respect.
There are also four other properties that I think might be valuable to
plugins. These are basically changed-state indicators, which I think
would be quite useful:
* whether or not playback is currently occurring (because some apps still
process audio even when playback is stopped)
* whether or not the playback location has jumped somewhere new for this
rendering buffer (eg SPL was just moved, cycle looped, etc.)
* whether or not the time signature just changed (warn a plugin that is
just "riding" on its current understanding of the meter that it should
strategize)
* whether or not the tempo has just changed (similar to above)
Yup, give me a slice of bread and I'll try and take the whole loaf... ;)
>
To add the additional support that has been discussed we're proposing
>
the following:
>
>
typedef struct HostCallbackInfo {
>
void * hostUserData;
>
HostCallback_GetBeatAndTempo beatAndTempoProc;
>
HostCallback_GetMusicalTimeLocation musicalTimeLocationProc;
>
} HostCallbackInfo;
>
>
An AudioUnit can determine if its being called for just the first proc
>
through checking the size of the passed in data proc.
Oh, this reminds me of a little (possible) bug I found a while ago: In
AUBase.cpp, memcpy is used for kAudioUnitProperty_HostCallbacks in
DispatchSetProperty, but an assignment is done in DispatchGetProperty.
This is fine for now given the struct, but might be an issue in the
future, so memcpy probably should be used in both cases, I think...
Marc
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.