• 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: what determines how many channels in the buffers supplied to the remoteIO output callback?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what determines how many channels in the buffers supplied to the remoteIO output callback?


  • Subject: Re: what determines how many channels in the buffers supplied to the remoteIO output callback?
  • From: Thomas Hass <email@hidden>
  • Date: Wed, 15 Aug 2012 21:48:24 -0400

Make sure the other members of the ASBD match your desired channel count.  For instance, this ASBD gives me mono:

AudioStreamBasicDescription format = {0};
UInt32 bytesPerSample = sizeof(Float32);
UInt32 numChannels = 1;
format.mFormatID = kAudioFormatLinearPCM;
format.mFormatFlags = kAudioFormatFlagIsFloat | kAudioFormatFlagIsPacked;
format.mFramesPerPacket = 1;
format.mChannelsPerFrame = numChannels;
format.mBytesPerFrame = numChannels * bytesPerSample;
format.mBytesPerPacket = numChannels * bytesPerSample;
format.mBitsPerChannel = bytesPerSample * 8;
format.mSampleRate = 44100.0;

Changing numChannels to 2 in this case gives me a stereo interleaved buffer in ioData.

Hope this helps,
-Thomas

On Tue, Aug 14, 2012 at 2:45 PM, Morgan Packard <email@hidden> wrote:
Hello,

I've set an AudioStreamBasicDescription for kAudioUnitScope_Input, bus 0 on my audio unit, and verified that this asbd is actually "sticking" by querying it again after I set it. In this asbd, mChannelsPerFrame is 2. However, in my render callback, I'm getting passed mono buffers via ioData. 

Should setting the number of channels in the AudioStreamBasicDescription correctly set the number of channels in the render callback? If not, what do I need to do to set the number of channels?

thanks,

-Morgan

--
===============
Morgan Packard
cell: (720) 891-0122
aim: mpackardatwork
twitter: @morganpackard


 _______________________________________________
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


 _______________________________________________
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: what determines how many channels in the buffers supplied to the remoteIO output callback?
      • From: Morgan Packard <email@hidden>
References: 
 >what determines how many channels in the buffers supplied to the remoteIO output callback? (From: Morgan Packard <email@hidden>)

  • Prev by Date: Re: general architectural approach question
  • Next by Date: Re: what determines how many channels in the buffers supplied to the remoteIO output callback?
  • Previous by thread: what determines how many channels in the buffers supplied to the remoteIO output callback?
  • Next by thread: Re: what determines how many channels in the buffers supplied to the remoteIO output callback?
  • Index(es):
    • Date
    • Thread