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: Bill Stewart <email@hidden>
- Date: Mon, 22 Jul 2002 17:28:07 -0700
You should use the AudioConverter directly I think...
If you look through the output case in /Developer/Examples/CoreAudio you'll
see how to use an AudioConverter - the only difference here is that the
input data from the device is your input.
When doing this internally, we've found that using AudioDeviceRead is better
for this than trying to synchronize and buffer with audio I/O threads...
In that case, you need to find out the safety offset of the input device,
then you read behind that safety offset according to how many frames you
want to process at a time...
So, you input callback for AudioConverterFillBuffer will just do an
AudioDeviceRead, and there's your data - it should be fairly easy to modify
the code mentioned above to do a soft play through in this way (probably
need to add a little bit of padding when doing this between different
devices to allow for any beating of their respective "real" sample rates)
Bill
on 7/22/02 10:53 AM, Christof Faller wrote:
>
I am using an audio input device that supports only 44.1 kHz. I would
>
like to re-sample this input to 32 kHz.
>
>
Is it possible for this purpose to use the Apple provided SRC audio
>
unit??? (however audio units are normally only used for output!?).
>
>
Or is there an easy standard way of doing this re-sampling without
>
writing re-sampling code?
>
>
Tx for the feedback,
>
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.
mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
"Thousands of years ago, cats were worshipped as gods. We have never
forgotten this."
__________________________________________________________________________
_______________________________________________
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.