Re: AAC recording issues
Re: AAC recording issues
- Subject: Re: AAC recording issues
- From: Eric Allamanche <email@hidden>
- Date: Thu, 29 Nov 2007 11:33:25 -0800
Jaime,
the supported AAC bit rate ranges for given sample rates are the following:
22050, 24000 Hz: 16000 to 64000 bps 32000 Hz: 24000 to 96000 bps 44100, 48000 Hz: 32000 to 160000 bps
These rates are per channel bit rates so you'll have to double them for stereo signals. Please verify that your parameters match these ranges.
Eric Date: November 20, 2007 1:50:07 PM PST Subject: AAC recording issues
Hello,
An application that I inherited utilizes recording in AAC. I recently noticed that we're getting "Can't Set Client" errors when attempting to use 22.05 khz sampling or a bit-rate lower than 64 kbps. Has anything changed in CoreAudio along those lines? (I would prefer to record high-quality and export to AAC, but we won't be able to transition that app in that direction very quickly due to user document size concerns).
This is basically what I've been doing...
dataFormat.mSampleRate = [[[self documentPreferences] objectForKey:@"audioSamplingRate"] intValue]; // values of 22050, 44100 or 48000 dataFormat.mFormatID = kAudioFormatMPEG4AAC; dataFormat.mFormatFlags = 0; dataFormat.mChannelsPerFrame = [[[self documentPreferences] objectForKey:@"audioChannelCount"] intValue]; // values of mono or stereo dataFormat.mFramesPerPacket = 1024;
dataFormat.mBitsPerChannel = 0; dataFormat.mBytesPerPacket = dataFormat.mBytesPerFrame = 0;
<snip>
recfile.SetConverterProperty(kAudioConverterEncodeBitRate, sizeof(UInt32), &bitrate); // values of 32, 64 or 128
As mentioned previously, it's been several years since I did any audio programming. So, it is likely a coding error. When dealing with VBR in AAC, I'm a little bit unsure of what I'm doing.
thanks,
Jaime
|
_______________________________________________
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