[Openal] Playback rate inaccuracies
Martin Delgado
martindel21 at yahoo.com
Wed Oct 12 08:11:59 PDT 2005
I'm having problems synchronizing playback and
recording for a multitrack recorder. One thing I've
found is that playback rates are not accurate. On my
win2000 machine with openal beta 1.1 I find that a 30
second sound segment takes 30.1 seconds to play back.
A 60 second segment takes roughly 60.2 to play, so the
error seems to be based on sound length, i.e. improper
playback rate.
I'm hypothesizing that sounds are being played back
too slowly and recorded at the proper speed. The
recorded track is synced to the slow playback, so it
turns out to be too slow.
I'm using Windows MCI for recording. Can this be a
problem with CPU versus sound card clock speeds?
Maybe MCI uses the CPU clock and playback is based on
the sound card clock. Everything would be fine with
even an inaccurate clock if the same clock was used
for playback and record.
Here's how I play my samples:
I start my sound with:
alSourcePlay(alSource);
I check for playing with:
bool Sound::isPlaying(void)
{
ALint i;
alGetSourcei(alSource, AL_SOURCE_STATE, &i);
switch (i)
{
case AL_PLAYING:
return true;
}
return false;
}
__________________________________
Yahoo! Music Unlimited
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/
More information about the Openal
mailing list