[music-dsp] Real Time Tempo & Synchronising Issues

Amarpreet Basi A.S.Basi at warwick.ac.uk
Tue Feb 1 14:18:35 EST 2005


hi Ben. I've investigated the callback route that you've outlined below. Got a few problems though so any suggestions would be extremely helpful. 

i've got something like this

callback function (output buffer)
{
  //


}

>>> ben at glw.com 01/25/05 16:21 PM >>>

The "hardware clock" that you need to get access to is that of the soundcard  
in your computer.  The way to take advantage of the soundcard's clock is to 
use a "callback" based API.  This means that, as the soundcard outputs audio 
samples, your callback function will be asked to fill the buffers before they 
are sent to the sound card.  You have the ability to touch every outgoing 
sample before it is sent to the soundcard,and therefore you can derive your 
timing very accurately (assuming that the soundcard's clock is accurate!)

I'm not familiar with FMOD but I think it allows for a "callback" based API in 
additon to the simplified API you are using.  I see a feature called "WAV 
marker synchronization call-backs" which might allow you to fire sounds on 
sample-accurate locations within the stream, while still taking advantage of 
the high-level file abstractions.  Maybe you should look into that.

-Ben  Loftis

--
dupswapdrop -- the music-dsp mailing list and website: 
subscription info, FAQ, source code archive, list archive, book reviews, dsp links 
http://shoko.calarts.edu/musicdsp 
http://ceait.calarts.edu/mailman/listinfo/music-dsp

--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp
http://ceait.calarts.edu/mailman/listinfo/music-dsp




More information about the music-dsp mailing list