• 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: Audio Units - newbie questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Audio Units - newbie questions


  • Subject: Re: Audio Units - newbie questions
  • From: Olivier Tristan <email@hidden>
  • Date: Wed, 12 Oct 2005 12:47:19 +0200

Muon Software Ltd - Dave wrote:

So with four busses I get four render calls, one for each bus, all with the
same time stamp. When the time stamp is the same as the previous timestamp I
know I'm rendering for the same slice.

I don't know if I could add a method to my synth to render one output at a
time. It might be better if, on the first call to Render I rendered into 8
mono temporary buffers which I then copy into the AU busses on subsequent
Render calls with the same time stamp depending on which bus I've been
passed in. That sounds vaguely workable to me, though it does mean I have to
maintain my temporary buffers quite carefully and there would be some mixing
overhead in the AU that the VST version doesn't suffer from.




Why don't you just inherits Render and call PrepareBuffer on each ouput.

Here is what I do :
(I've only pasted the relevant code)
Maybe bill will say it's horrible..
(Works in Logic 6.3, Logic 7, DP, Live 4,5 and many others)

//////////////////////////////////////////////////////////////////////////////
/*! Renders our output */
ComponentResult AUPlugin::Render( AudioUnitRenderActionFlags& ioActionFlags, const AudioTimeStamp& inTimeStamp, UInt32 nFrames ) {


uint numOutputBusCount = Outputs().GetNumberOfElements();

//you can now iterate over each value of i from 0 to numOutputBusCount .
// where 0 is the main output.
AUOutputElement *output = GetOutput(i);
AudioBufferList &outputBufferList = output->PrepareBuffer(nFrames);
AUBufferList::ZeroBuffer(outputBufferList); // zero if your a synth or copy from input if you are an effect


uint channelCount = outputBufferList.mNumberBuffers;

//each main out channel can be accessed like that where i is the channel index from 0 to channelCount
reinterpret_cast<float*>(outputBufferList.mBuffers[i].mData)


//Then Process of  buffers
}


Hope this helps.

--
Olivier Tristan
Ultimate Sound Bank

_______________________________________________
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: Audio Units - newbie questions
      • From: "Muon Software Ltd - Dave" <email@hidden>
References: 
 >RE: Audio Units - newbie questions (From: "Muon Software Ltd - Dave" <email@hidden>)

  • Prev by Date: RE: Audio Units - newbie questions
  • Next by Date: RE: Audio Units - newbie questions
  • Previous by thread: RE: Audio Units - newbie questions
  • Next by thread: RE: Audio Units - newbie questions
  • Index(es):
    • Date
    • Thread