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

AudioConverterConvertBuffer() and interleaved data


  • Subject: AudioConverterConvertBuffer() and interleaved data
  • From: Guillermo Lapresta <email@hidden>
  • Date: Thu, 15 Sep 2005 13:52:50 +0200

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.
 _______________________________________________
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: Guillermo Lapresta <email@hidden>
    • Re: AudioConverterConvertBuffer() and interleaved data
      • From: Doug Wyatt <email@hidden>
    • Re: AudioConverterConvertBuffer() and interleaved data
      • From: Doug Wyatt <email@hidden>
    • Re: AudioConverterConvertBuffer() and interleaved data
      • From: Stephen Davis <email@hidden>
  • Prev by Date: Re: Quicktime support for Core Audio AudioFileFormat components.
  • Next by Date: Re: Edirol FA-101 and CoreAudio (Jeff Moore)
  • Previous by thread: Re: Quicktime support for Core Audio AudioFileFormat components.
  • Next by thread: Re: AudioConverterConvertBuffer() and interleaved data
  • Index(es):
    • Date
    • Thread