Re: sample rate conversion question
Re: sample rate conversion question
- Subject: Re: sample rate conversion question
- From: Doug Wyatt <email@hidden>
- Date: Tue, 26 Oct 2004 10:55:32 -0700
On Oct 25, 2004, at 21:09, Stan Jou wrote:
So far I've integrated the CoreAudio example 'afrecord'
with a simple Cocoa interface.
It works well on sample rate 44100.
Now I'm trying to incorporate sample rate conversion
to make the sample rate 8000.
So I add a SetClientFormat() call to afrecord.cpp:
file.PrepareNew(dataFormat, 8000);
dataFormat.mSampleRate = 44100;
file.SetClientFormat(dataFormat);
file.Create(recordFileName, kAudioFileAIFFType);
then I get a AudioUnitErr_CannotDoInCurrentContext = -10863.
How should I do it correctly?
Should I do it in another thread as suggested in TN2091?
This is a deficiency in afrecord. The problem is that it's not fully
consuming the input due to the rate conversion. I'll look into fixing
it.
I also try to do it off-line, e.g.
'afrecord' then 'afconvert',
but I can't figure out the parameters to
make 'afconvert' work properly to do SRC.
Could somebody please help?
afconvert -f AIFF -d BEI16@8000 inputfile outputfile
hth,
Doug
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden