RE: Getting exact playout time of audio buffers in GarageBand
RE: Getting exact playout time of audio buffers in GarageBand
- Subject: RE: Getting exact playout time of audio buffers in GarageBand
- From: "Christian Buchner" <email@hidden>
- Date: Thu, 7 Jul 2005 23:05:01 +0200
> The context in which your AudioUnit is called can vary. It might be
called in
> the realtime audio I/O thread, a secondary "feeder" thread, or in an
offline
> context, so your AudioUnit should not try to hack around with the
timestamps and
> instead should just honor the sample offsets.
The real issue is that I cannot instruct an external hardware MIDI
synthesizer
to start playing at a specific sample offset. I need to know the exact time
when
that sample will actually be played out so that I can send the MIDI event at
exactly the right time. Right now I am using the time of the last Render()
call as
a reference timestamp - but that is dependent on CPU load and other random
factors and thus I get a clock skew of up to the duration of an audio
buffer.
An AUGraph seems to give me that very playout timestamp I am looking for (I
verified
this with the PlaySoftMIDI example from the CoreAudio SDK) I just do not
understand
why GarageBand won't - therefore I will have to come up with some sort of
hack
because my plugin is really intended to be used in this application. I agree
that
hacks are ugly but it seems to be necessary here.
Christian
_______________________________________________
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