Re: Audio delay when using CoreAudio outputs with QuickTime under 10.2
Re: Audio delay when using CoreAudio outputs with QuickTime under 10.2
- Subject: Re: Audio delay when using CoreAudio outputs with QuickTime under 10.2
- From: Jeff Moore <email@hidden>
- Date: Wed, 23 Apr 2003 14:57:01 -0700
A track in a QT movie functionally equates to a single SndChannel in
the Sound Manager so there really isn't a way to have one track play to
two devices.
If you want to keep working in a solely QT/Sound Manager context, you
can use the lower level track and media routines in QT to retrieve the
data from the disk (or wherever), and use the Sound Converter to decode
them. From there, you have complete freedom with what to do with the
data in order to play it in synch with other data. I think there is a
some sample code up on the QT website that illustrates doing this
specifically. I think it is called "ConvertMovieSndTrack" or something
to that effect.
On Wednesday, April 23, 2003, at 02:45 PM, Dave Addey wrote:
Hi Jeff,
Yes, this sounds like the problem. Well, guess I need to get my hands
dirty
then... unless...
Is there *any* way to point one track of a quicktime movie at two
different
output devices (via quicktime, or coreaudio, or anything else)? The
only
reason I'm using two tracks (and having this sync problem) is because I
haven't found a way to do this.
I'm not looking for a complete solution: really, just a "yes you can"
/ "no
you can't". Your help so far has been *much* appreciated in pointing
me in
the right direction.
Thanks,
Dave.
On 21/4/03 11:29 pm, "Jeff Moore" <email@hidden> wrote:
Your problem is likely due to the fact that the Sound Manager doesn't
provide sample accurate synch with compressed audio data. With MP3,
each packet of data has 1152 samples. That's the granularity with
which
you can schedule the data for playback with the Sound Manager since it
only can deal with things in terms of whole packets. QT, and all Sound
Manager playback clients, inherit this limitation.
Speaking as a DJ (I spin drum & bass), I can say that 1152 frame
granularities for scheduling makes it nigh impossible to actually do
beat matching with any degree of confidence. It basically means you
can
only drop in a new track every 26.1 milliseconds (assuming a 44100
sample rate). A typical d&b track spinning at 180 BPM, where each beat
spans roughly 333 and a third milliseconds, won't line up on those
intervals too often. You're left dropping the track and then nudging
the beats into place with pitch bend pretty much every time.
Your only solution is to take more control over the playback process
and decode the data yourself, so that you can schedule everything with
sample accurate precision.
On Monday, April 21, 2003, at 02:57 PM, Dave Addey wrote:
------------------------------------
Dave Addey
email@hidden
DJ-1800
Complete MP3 DJ solution for the Mac
http://www.dj1800.com/
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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.