Re: Sample rate conversion of audio input device
Re: Sample rate conversion of audio input device
- Subject: Re: Sample rate conversion of audio input device
- From: Christof Faller <email@hidden>
- Date: Mon, 29 Jul 2002 13:09:33 -0400
Thanks, Bill, for the good answer. The AudioConverter is exactly what I
need.
I have two more questions:
1
The usage of AudioConverterFillBuffer is clear to me, when I look at the
Apple sample code in
Developer/Examples/CoreAudio/Services/DefaultOutputUnit/UsingAudioConverter.cpp
I could use AudioConverterFillBuffer for my application. However for
minimizing the delay I would rather use AudioConverterConvertBuffer.
That is, because it would be better for me to at once convert the
complete buffer I get from the audio input device (I am working on a
tele-conferencing application with echo cancellation, thus I'd like to
have as low delay as possible).
The problem is that I need to specify for AudioConverterConvertBuffer
the number of input and output frames. In my case I have given the
number of input frames. And I don't know how many output frames this
will correspond to (I know it only +-1 because the SRC generates +-1
more or less samples when the two rates are not an even fraction).
I tried to use:
kAudioConverterPropertyCalculateOutputBufferSize
but it returns: kAudioConverterErr_FromatNotSupported
Is there a way of converting given sized buffers with
AudioConverterConvertBuffer and automatically always use all samples?
That is, just convert the complete buffer and let the function tell me
with how many sample the conversion ended up with.
2
For the echo cancellation timing is important. Can I obtain any
knowledge about the delay introduced by the SRC when using
AudioConverterFillBuffer or AudioConverterConvertBuffer?
I really appreciate the good job you Apple guys are doing in answering
all these questions so well!!!
Thanks,
Chris
_______________________________________________
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.