• 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: DefaultOutputUnit with interleaved data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DefaultOutputUnit with interleaved data


  • Subject: Re: DefaultOutputUnit with interleaved data
  • From: William Stewart <email@hidden>
  • Date: Mon, 3 Mar 2008 12:42:28 -0800


On Feb 27, 2008, at 6:42 AM, Roland Silver wrote:


I'm trying to adapt the code from <CoreAudio/SimpleSDK/DefaultOutputUnit> to serve as a back end to allow my music composition program to play sounds.


In DefaultOutputUnit the audio data is non-interleaved; I need to change it so that the data is interleaved. One obvious thing to change is theFormatFlags, from


  UInt32 theFormatFlags =

        kLinearPCMFormatFlagIsSignedInteger 

| kAudioFormatFlagsNativeEndian

| kLinearPCMFormatFlagIsPacked

| kAudioFormatFlagIsNonInterleaved;


to 


UInt32 theFormatFlags =

        kLinearPCMFormatFlagIsSignedInteger 

| kAudioFormatFlagsNativeEndian

| kLinearPCMFormatFlagIsPacked


Also, since there are two channels, there should be one buffer (twice the size of the buffers in  the non-interleaved case), not two.


yes - but this also changes the bytes per packet values, etc... Its probably best to use the CAStreamBasicDescription class in PublicUtility - it has a SetCanonical method that allows you to specify interleaved or not, and it will fill out the ASBD fields for you


Question 1: How do I set that up?


the default output unit will give you a buffer that is sized and configured based on the format that you are setting

Question 2: What else do I need to change?



Roland Silver
email@hidden


Bill
 _______________________________________________
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

References: 
 >DefaultOutputUnit with interleaved data (From: Roland Silver <email@hidden>)

  • Prev by Date: Re: Example of using hardware input with mixer in AUGraph
  • Next by Date: Re: Example of using hardware input with mixer in AUGraph
  • Previous by thread: DefaultOutputUnit with interleaved data
  • Next by thread: Mapping mono to stereo inputs
  • Index(es):
    • Date
    • Thread