• 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: AudioConverterConvertBuffer() and interleaved data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioConverterConvertBuffer() and interleaved data


  • Subject: Re: AudioConverterConvertBuffer() and interleaved data
  • From: Stephen Davis <email@hidden>
  • Date: Thu, 15 Sep 2005 09:49:47 -0700

On Sep 15, 2005, at 4:52 AM, Guillermo Lapresta wrote:

Dear all,

  I'm trying to convert the float, interleaved data from an stereo audio unit to a uninterleaved, signed PCM format for writing out an AIFF file. That is, I have an AudioBufferList with two data pointers, mBuffers[0].mData and mBuffers[1].mData.

  My question is how can I supply these buffers to AudioConverterConvertBuffer(), since it needs a single pointer and I have two. From API:

extern OSStatus AudioConverterConvertBuffer(
    AudioConverterRef inAudioConverter, 
    UInt32 inInputDataSize, 
    const void*inInputData, 
    UInt32*ioOutputDataSize, 
    void*outOutputData); 


inInputDataSize must be (mBuffers[x].mDataByteSize * mNumberBuffers), otherwise the call returns an insz error. It seems right. But, which pointer should I pass as inInputData? If I put mBuffers[0].mData, only first channel is processed, and the same if I do with mBuffers[1].mData. I have no idea of what's the correct answer, could anyone give me a pointer to the right direction?

I tried also to uninterleave it manually to a buffer, but then, setting the AudioConverter's input description turning on the flag kAudioFormatFlagIsNonInterleaved, it complains with a 'fmt?' error.

Thanks in advance, and sorry if this is a really stupid question. I'm a newbie with this. 

For (de)interleaving with an AudioConverter, you must use the AudioConverterFillComplexBuffer() call instead.  I've tried to do the same thing.  :-)

stephen
 _______________________________________________
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: AudioConverterConvertBuffer() and interleaved data
      • From: Greg Chapman <email@hidden>
References: 
 >AudioConverterConvertBuffer() and interleaved data (From: Guillermo Lapresta <email@hidden>)

  • Prev by Date: Re: Edirol FA-101 and CoreAudio (Jeff Moore)
  • Next by Date: Re: Edirol FA-101 and CoreAudio (Jeff Moore)
  • Previous by thread: AudioConverterConvertBuffer() and interleaved data
  • Next by thread: Re: AudioConverterConvertBuffer() and interleaved data
  • Index(es):
    • Date
    • Thread