• 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
Why does the AudioBuffer structure contain mNumberChannels?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why does the AudioBuffer structure contain mNumberChannels?


  • Subject: Why does the AudioBuffer structure contain mNumberChannels?
  • From: Ilya Konstantinov <email@hidden>
  • Date: Sun, 22 Feb 2015 19:44:00 +0200

When calling AudioUnitRender, we're passing a list of AudioBuffers:

​  ​
struct AudioBuffer
​  ​
{
    UInt32  mNumberChannels; // <-- why this?
    UInt32  mDataByteSize;
    void*   mData;
​  ​
};

Why does it
​ have to​
contain
​ an​
mNumberChannels
​ member?​
​
​
​

After all, we've already set up the stream format with an AudioStreamBasicDescription
​, including ​
mChannelsPerFrame
​:​


​  ​
struct AudioStreamBasicDescription
​  ​
{
    Float64             mSampleRate;
    AudioFormatID       mFormatID;
    AudioFormatFlags    mFormatFlags;
    UInt32              mBytesPerPacket;
    UInt32              mFramesPerPacket;
    UInt32              mBytesPerFrame;
    UInt32              mChannelsPerFrame; // <-- ... when we have this?
    UInt32              mBitsPerChannel;
    UInt32              mReserved;
​  ​
};

​Thanks.​

 _______________________________________________
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: Why does the AudioBuffer structure contain mNumberChannels?
      • From: Paul Davis <email@hidden>
  • Prev by Date: Re: MusicPlayer with OpenGL interfere with UIGestureRecognizer
  • Next by Date: Re: Why does the AudioBuffer structure contain mNumberChannels?
  • Previous by thread: Re: MusicPlayer with OpenGL interfere with UIGestureRecognizer
  • Next by thread: Re: Why does the AudioBuffer structure contain mNumberChannels?
  • Index(es):
    • Date
    • Thread