• 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: Offline rendering in a AUGraph using a Generic Output node on iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Offline rendering in a AUGraph using a Generic Output node on iOS


  • Subject: Re: Offline rendering in a AUGraph using a Generic Output node on iOS
  • From: David Blake <email@hidden>
  • Date: Mon, 04 Mar 2013 22:17:49 +1100

Hi Chris,

My ASBD is as follows:

Int16StreamFormat.mSampleRate = graphSampleRate;
Int16StreamFormat.mFormatID = kAudioFormatLinearPCM;
Int16StreamFormat.mFormatFlags = kAudioFormatFlagsCanonical ;
Int16StreamFormat.mFramesPerPacket = 1;
Int16StreamFormat.mChannelsPerFrame = 1;
Int16StreamFormat.mBitsPerChannel = 16;
Int16StreamFormat.mBytesPerPacket = 2;
Int16StreamFormat.mBytesPerFrame = 2;

This is assigned to the mixerUnitMaster (my graph goes   masterRenderCallback -> mixerUnitMaster -> generic output )

result = AudioUnitSetProperty (   mixerUnitMaster, 
  kAudioUnitProperty_StreamFormat,
  kAudioUnitScope_Input,
  busNumber,
  &Int16StreamFormat,
  sizeof (Int16StreamFormat)

  );

and then connected to the iONode (the node for 'outputUnit') like so:

  result = AUGraphConnectNodeInput (  processingGraph,  mixerNodeMaster,   0,     iONode,   0   );


I assume by setting the ASBD on the mixerNodeMaster the outputUnit will inherit this ?

I notice you say the outputUnits output scope though, I am only setting the input scope - could this be the problem?

Thanks for any insight you can give!

David


On 4 March 2013 21:59, Chris Adamson <email@hidden> wrote:
Can you show the AudioStreamBasicDescription that you will be getting from the output unit (ie, outputUnit's output scope, bus 0)?

If it's stereo and its flags set kAudioFormatFlagIsNonInterleaved, then your AudioBufferList should have two AudioBuffers. That's a common source of -50's when calling AudioUnitRender().

--Chris

On Mar 3, 2013, at 7:55 AM, David Blake <email@hidden> wrote:

> In my research however no one seems to have an example of how to actually called AudioUnitRender from outside an existing callback. I have also come across historical posts from this list with people not sure if this even possible in a graph and you actually just have to interact with a single node itself? Has anyone achieved this, and if so do you think you could post some example code? I have posted my code below but I am getting the dreaded error -50 when I call AudioUnitRender()


 _______________________________________________
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: Offline rendering in a AUGraph using a Generic Output node on iOS
      • From: Chris Adamson <email@hidden>
    • Re: Offline rendering in a AUGraph using a Generic Output node on iOS
      • From: David Blake <email@hidden>
References: 
 >Offline rendering in a AUGraph using a Generic Output node on iOS (From: David Blake <email@hidden>)
 >Re: Offline rendering in a AUGraph using a Generic Output node on iOS (From: Chris Adamson <email@hidden>)

  • Prev by Date: Re: Offline rendering in a AUGraph using a Generic Output node on iOS
  • Next by Date: Re: Offline rendering in a AUGraph using a Generic Output node on iOS
  • Previous by thread: Re: Offline rendering in a AUGraph using a Generic Output node on iOS
  • Next by thread: Re: Offline rendering in a AUGraph using a Generic Output node on iOS
  • Index(es):
    • Date
    • Thread