Re: Modifying afrecord sample file
Re: Modifying afrecord sample file
- Subject: Re: Modifying afrecord sample file
- From: William Stewart <email@hidden>
- Date: Fri, 14 May 2004 12:43:56 -0700
for any of these - have a look at the afconvert code in the same
project... it shows you how to set up a desc for AAC (and handle
setting things like desired bit rate, etc).
Bill
On 13/05/2004, at 2:50 PM, Bruno Blondeau wrote:
>
I'm trying to modify the afrecord.cpp sample file so as to use AAC
>
encoding instead of the PCM/AIFF one.
>
>
Could anyone explain me what to change?
>
>
>
const int kNumberBuffers = 3;
>
const unsigned kBufferSize = 0x8000;
>
CAAudioFile file;
>
CAAudioFileRecorder recorder(kNumberBuffers, kBufferSize);
>
CAStreamBasicDescription dataFormat;
>
dataFormat.mSampleRate = 44100.; // later get this from the hardware
>
dataFormat.mFormatID = kAudioFormatLinearPCM;
>
dataFormat.mFormatFlags = kAudioFormatFlagIsBigEndian |
>
kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked;
>
dataFormat.mFramesPerPacket = 1;
>
dataFormat.mChannelsPerFrame = 2;
>
dataFormat.mBitsPerChannel = 16;
>
dataFormat.mBytesPerPacket = dataFormat.mBytesPerFrame = 4;
>
file.PrepareNew(dataFormat, 0.);
>
file.Create(recordFileName, kAudioFileAIFFType);
>
recorder.SetFile(file.GetAudioFileID());
>
Record(recorder);
>
>
>
>
Also, I've heard MP3 encoding isn't available. Is this still true?
>
>
What about QuickTime encoders? (Qualcomm, QDesign...)
>
Would it be possible to modify afrecord to use them and generate a
>
quicktime readable file? (there doesn't seem to be a kAudioFile******
>
for these formats)
>
>
>
--
>
Bruno
>
_______________________________________________
>
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
________________________________________________________________________
__
Culture Ship Names:
Ravished By The Sheer Implausibility Of That Last Statement
I said, I've Got A Big Stick [OU]
Inappropiate Response [OU]
Far Over The Borders Of Insanity And Still Accelerating [Eccentric]
________________________________________________________________________
__
_______________________________________________
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.