AudioConverter and interleaving woes
AudioConverter and interleaving woes
- Subject: AudioConverter and interleaving woes
- From: "Malcolm Haylock" <email@hidden>
- Date: Sun, 10 Oct 2004 04:08:29 +1000 (EST)
- Importance: Normal
Hi Everyone,
I'm having troubles using an AudioConverter to de-interleave an 8-channel
stream.
The formats are:
Input is interleaved:
mSampleRate = 44100
mFormatID = kAudioFormatLinearPCM
mFormatFlags = kLinearPCMFormatFlagIsSignedInteger
| kLinearPCMFormatFlagIsBigEndian
| kLinearPCMFormatFlagIsPacked
mFramesPerPacket =1
mChannelsPerFrame = 8
mBitsPerChannel = 32
mBytesPerPacket = 32
mBytesPerFrame = 32
Output is same as input but not interleaved:
mSampleRate = 44100
mFormatID = kAudioFormatLinearPCM
mFormatFlags = kLinearPCMFormatFlagIsSignedInteger
| kLinearPCMFormatFlagIsBigEndian
| kLinearPCMFormatFlagIsPacked
| kAudioFormatFlagIsNonInterleaved
mFramesPerPacket =1
mChannelsPerFrame = 8
mBitsPerChannel = 32
mBytesPerPacket = 4
mBytesPerFrame = 4
The input and output buffers should be the same size, but when I use
AudioConverterGetProperty() to find the input buffer size for a given
output buffer size (flag kAudioConverterPropertyCalculateInputBufferSize),
it tells me that the input buffer size should be 8 times the output buffer
size. Therefore any call to AudioConvertBuffer will fail if I give it the
same size buffers.
What is going on - is this an incorrect use for AudioConverters?
Thanks,
Malcolm Haylock
_______________________________________________
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