Re: Basic AudioStreamBasicDescription question
Re: Basic AudioStreamBasicDescription question
- Subject: Re: Basic AudioStreamBasicDescription question
- From: Jeff Moore <email@hidden>
- Date: Thu, 11 Dec 2008 10:13:11 -0800
On Dec 11, 2008, at 10:05 AM, Mike Kluev wrote:
1) I've got the following sample description from OS:
AudioStreamBasicDescription:
.mSampleRate == 44100;
.mFormatID == 'lpcm';
.mFormatFlags == 0x29; // float, packed, non interleaved
.mBytesPerPacket == 4;
.mFramesPerPacket == 1;
.mBytesPerFrame == 4;
.mChannelsPerFrame == 2;
.mBitsPerChannel == 32;
.mReserved == 0;
Focusing on:
.mBytesPerFrame == 4;
.mChannelsPerFrame == 2;
.mBitsPerChannel == 32;
How could this be true?
In particular: if channels/frame == 2 and bits/channel == 32 then
I'd expect
bits/frame to be 64, so bytes/frame should be 8, yet it 4. And vice
versa.
This is the effect of the non-interleaved flag. When that flag is set,
all the fields are computed as if they were for a single channel,
except for mChannelsPerFrame which has the total number of channels.
2) Is FillOutASBDForLPCM (and CalculateLPCMFlags) API reliable? I do
not see how to
instruct it to give me the above result (provided the above result
is somehow valid).
My quick review of the code would lead me to believe that
FillOutASBDForLPCM() won't create a proper non-interleaved ASBD.
Please file a bug.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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