• 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: Using existing VST/RTAS DSP code in AudioUnit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using existing VST/RTAS DSP code in AudioUnit


  • Subject: Re: Using existing VST/RTAS DSP code in AudioUnit
  • From: Howard Moon <email@hidden>
  • Date: Tue, 22 Feb 2011 14:00:17 -0800

Excellent, that looks like what I'm looking for.

Thanks!
	Howard

On Feb 22, 2011, at 12:42 PM, Muon Software Ltd - Dave wrote:

>> I'm not sure I understand what you're intending to do in the loop there. It doesn't look much like the Render code in the AUEffectBase class.  That class calls
>> ProcessBufferLists (possibly repeatedly via ProcessForScheduledParams, if using scheduled parameter changes), which in turn calls my Kernel object's Process
>> function. I'm unsure how I can create a pair of buffers for input and another pair for output, for processing via a single call to my DSP object.
>
>
> Howard,
>
> I remember looking at this some time ago - I think Olivier's is possible referring to code suitable for a class deriving from MusicDeviceBase and so overriding Render() - his code looks really quite similar to code I use in my own instruments.
>
> However, if you're deriving your class from one of the effect base classes, then overriding ProcessBufferLists() is the way to go if you don't want to bother with the kernel stuff. I have to say I found it hard to use those classes in the context of a cross platform project as, like you, I have an internal rendering function that expects to get a flat list of input and output pointers like you would get from VST and RTAS.
>
> For an effect AU (in this case deriving from AUMIDIEffectBase) my ProcessBufferLists() implementation is a bit like this:-
>
> 	int nChannels = (int)GetNumberOfChannels();
> 	int nInputBuffers = (int)inBuffer.mNumberBuffers;
> 	int nOutputBuffers = (int)outBuffer.mNumberBuffers;
>
> 	if (nInputBuffers!=nOutputBuffers || nInputBuffers>2 || nOutputBuffers>2)
> 	{
> 		//you might not want to support formats with mismatched numbers of inputs and outputs...
> 		return noErr;
> 	}
>
> 	int sampleFrames=(int)inFramesToProcess;
> 	float* inputs[2];
> 	float* outputs[2];
>
> 	inputs[0]=(float*)inBuffer.mBuffers[0].mData;
> 	outputs[0]=(float*)outBuffer.mBuffers[0].mData;
>
> 	if (nInputBuffers==2)
> 	{
> 		inputs[1]=(float*)inBuffer.mBuffers[1].mData;
> 		outputs[1]=(float*)outBuffer.mBuffers[1].mData;
> 	}
> 	else
> 	{
> 		//TODO: check this is OK in a mono configuration
> 		inputs[1]=inputs[0];
> 		outputs[1]=outputs[0];
> 	}
>
>
> I didn't bother with any of the downstream kernel classes. The above code is good for {1,1} and {2,2} configs.
>
> Hope this helps
> Dave Waugh
> Managing Director
> Muon Software Ltd
> http://www.muon-software.com
> http://muonsoftware.blogspot.com
>
>
>
>
>
>

 _______________________________________________
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: 
 >Using existing VST/RTAS DSP code in AudioUnit (From: Howard Moon <email@hidden>)
 >Re: Using existing VST/RTAS DSP code in AudioUnit (From: Olivier Tristan <email@hidden>)
 >Re: Using existing VST/RTAS DSP code in AudioUnit (From: Howard Moon <email@hidden>)
 >RE: Using existing VST/RTAS DSP code in AudioUnit (From: Muon Software Ltd - Dave <email@hidden>)

  • Prev by Date: Re: AU->UI communication
  • Next by Date: Re: Error in AUListenerAddParameter
  • Previous by thread: RE: Using existing VST/RTAS DSP code in AudioUnit
  • Next by thread: Re: Using existing VST/RTAS DSP code in AudioUnit
  • Index(es):
    • Date
    • Thread