AudioConverter sample rate conversion
AudioConverter sample rate conversion
- Subject: AudioConverter sample rate conversion
- From: email@hidden
- Date: Thu, 29 May 2003 15:17:05 -0400 (EDT)
I am writing a little app to playthrough sound from an input to an output;
though they are both 44.1khz, the actual speed can fluctuate a bit so I am
trying to use sample rate conversion to keep from overrunning or
underrunning my buffer.
I am trying to us the AudioConverterFillBuffer function to do this
conversion, and its working great. It seems like the only way to change
the sample rate is to create a new AudioConverter, so to prevent hiccups I
want to use "kConverterPrimeMethod_Pre" to prime the new converter with
data before it starts working, however I can't figure out how much extra
data its reading the first time.
I'm using AudioConverterGetProperty of kAudioConverterPrimeInfo to get
leading/trailing sizes, but they read as 48 and I'm seeing the converter
ask for a lot more than 48*2 extra on its first read (more like 1000). If
I try to set the kAudioConverterPrimeInfo values, i get an error. Am I
going about this the wrong way?
Here's how I'm trying to get the leading/trailing frames:
PrimeInfo primeInfo;
err = AudioConverterGetProperty(tempAudioConverterRef,
kAudioConverterPrimeInfo,
sizeof(&primeInfo),
&primeInfo);
Thanks for any info!
-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.