sample rate conversion question
sample rate conversion question
- Subject: sample rate conversion question
- From: Stan Jou <email@hidden>
- Date: Tue, 26 Oct 2004 00:09:51 -0400
Hi list friends,
I have some problem on sample rate conversion.
Could somebody please advise?
What I plan to write is a simple recorder program
dedicated to my own little use,
running on my 12" Powerbook running OS X 10.3.
The program should record from the line jack.
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?
Since this program should be really simple,
I'm also wondering if there is some easier way
other than writing Core Audio to do this?
I feel Core Audio might be too powerful for me to
do this simple task... :-)
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?
Thank you!
Stan.
_______________________________________________
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