• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AudioConverter and interleaving woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioConverter and interleaving woes


  • Subject: Re: AudioConverter and interleaving woes
  • From: Jeremy Sagan <email@hidden>
  • Date: Sat, 9 Oct 2004 15:11:28 -0400

Malcolm,

From CoreAudioTypes.h

// However, when an ASBD has the kAudioFormatFlagIsNonInterleaved flag, the AudioBufferList has a different
// structure and semantic. In this case, the ASBD fields will describe the format of ONE of the AudioBuffers
// that are contained in the list, AND each AudioBuffer in the list is determined to have a single (mono) channel
// of audio data. Then, the ASBD's mChannelsPerFrame will indicate the total number of AudioBuffers that are
// contained within the AudioBufferList - where each buffer contains one channel. This is used primarily with
// the AudioUnit (and AudioConverter) representation of this list - and typically won't be found in the AudioHardware usage of
// this structure.


On Oct 9, 2004, at 2:08 PM, Malcolm Haylock wrote:

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:
email@hidden


This email sent to email@hidden


_______________________________________________ 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
  • Follow-Ups:
    • Re: AudioConverter and interleaving woes
      • From: "Malcolm Haylock" <email@hidden>
References: 
 >AudioConverter and interleaving woes (From: "Malcolm Haylock" <email@hidden>)

  • Prev by Date: AudioConverter and interleaving woes
  • Next by Date: Does the Varispeed Unit support multi channels in phase
  • Previous by thread: AudioConverter and interleaving woes
  • Next by thread: Re: AudioConverter and interleaving woes
  • Index(es):
    • Date
    • Thread