Re: Simple Question on m4a CAStreamBasicDescription and Recording
Re: Simple Question on m4a CAStreamBasicDescription and Recording
- Subject: Re: Simple Question on m4a CAStreamBasicDescription and Recording
- From: Brad Ford <email@hidden>
- Date: Thu, 25 Oct 2007 14:43:13 -0700
On Oct 25, 2007, at 2:24 PM, Jaime Magiera wrote:
<SNIP>
CAStreamBasicDescription dataFormat;
dataFormat.mSampleRate = 44100;
dataFormat.mFormatID = kAudioFormatMPEG4AAC;
dataFormat.mFormatFlags = kAudioFormatFlagIsBigEndian |
kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked;
dataFormat.mFramesPerPacket = 1;
dataFormat.mChannelsPerFrame = 2;
dataFormat.mBitsPerChannel = 16;
dataFormat.mBytesPerPacket = dataFormat.mBytesPerFrame = 4;
Your asbd is messed up. (That's a technical term). You're filling it
out as if the audio is uncompressed, which it isn't. It should
probably look something like this:
dataFormat = { 0 };
dataFormat.mSampleRate = 44100;
dataFormat.mFormatID = kAudioFormatMPEG4AAC;
dataFormat.mChannelsPerFrame = 2;
dataFormat.FramesPerPacket = 1024;
-Brad Ford
QuickTime Engineering
_______________________________________________
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