mRateScalar, audio driver speed
mRateScalar, audio driver speed
- Subject: mRateScalar, audio driver speed
- From: email@hidden
- Date: Thu, 15 May 2003 21:32:57 -0400 (EDT)
Hi!
I asked a while ago a few questions about getting post mix audio, and
Laurent suggested taking a look at the PhantomAudioDriver example, which
turned out to be just the ticket; I modified that slightly so i could get
my post mix audio output coming right back in as input. So that's all
well and good, but:
I wanted to be able to hear the audio also, so I wrote a little app that
plays the Phantom input out through the Built-In output. It soon became
clear that the phantom input was providing data ever so slightly slower
than the Built-In output wanted it. I converted the sample rate just a
bit using apple's AudioConverter code, and that works ok, but it doesn't
seem like the right solution. Is there any way to ensure that the drivers
run at the same speed (or at least, much closer)? I am seeing a
difference of about 0.5%, which is consistent with the mRateScalar, which
usually stays around 0.995 for the Phantom driver and 0.9999 for the
Buit-In driver.
Nothing I'm doing seems time consuming, so i don't think I could be
overloading anything; the driver is simply copying the data and clipping
it, and the playthrough app's ioProc was seeing the 0.995 mRateScalar even
when there was no code in the ioProc (other than to note the mRateScalar,
of course)
So, is this to be expected? Is there some way to slave the two devices,
or at least make the phantom driver more accurate? It seems like the
capability is there for more accuracy, since the system knows exactly how
far wrong the driver is...
I've probably said something above that indicates my lack of
understanding, so if I'm asking the wrong questions please let me know!
thanks for any help or tips!!
-jg
_______________________________________________
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.