Re: Process and Render
Re: Process and Render
- Subject: Re: Process and Render
- From: William Stewart <email@hidden>
- Date: Mon, 21 Jun 2004 14:28:44 -0700
Probably just the way you are defining Process:
void SampleEffectUnit::SampleEffectKernel::Process ()
- EXCEPT that Process actually takes some args - so the declaration
you have below would not be called...
On 18/06/2004, at 8:41 PM, Aristotel Digenis wrote:
>
Hello again,
>
>
As I have been using the SDK's SampleEffectUnit example to learn AUs
>
and adapt it to my needs, I have notices that the Process() function
>
is declared within a class inside the SampleEffectUnit class as shown
>
below.
>
>
class SampleEffectUnit : public AUEffectBase
>
{
>
public:
>
SampleEffectUnit(AudioUnit component);
>
virtual AUKernelBase * NewKernel() { return new
>
SampleEffectKernel(this); }
>
virtual ComponentResult GetParameterValueStrings();
>
virtual ComponentResult GetParameterInfo();
>
virtual ComponentResult GetPropertyInfo();
>
virtual ComponentResult GetProperty();
>
virtual ComponentResult GetPresets() const;
>
virtual OSStatus NewFactoryPresetSet ();
>
virtual ComponentResult Version() { return
>
kSampleEffectUnitVersion; }
>
>
protected:
>
class SampleEffectKernel : public AUKernelBase
>
{
>
public:
>
SampleEffectKernel(AUEffectBase *inAudioUnit ):
>
AUKernelBase(inAudioUnit){}
>
>
virtual void Process();
>
virtual void Reset();
>
}; };
>
>
I understand the purpose of the AUKernelBase but then I saw the source
>
code of AirSynth where the Process() function is not declared inside a
>
seperate AUKernel class. Instead the Process function is declared
>
inside the AirySynth class. I tried to move the Process() function of
>
my plug in out of the SampleEffectKernel class and inside the
>
SampleEffectUnit class, but this results in no processing taking
>
place. Does the fact that AirySynth is a MusicDevice make a
>
difference? Do MusicDevices have different processing structure to
>
Effect Units?
>
>
Also, use SetParameter() functions in my constructor to set the
>
initial values of my sliders. This works fine and the sliders do have
>
an effect on the processing. Having read the API documentation I
>
thought it would be better to use Initialize() to set these
>
parameters, and so I declared the Initialize() function after the
>
SampleEffectUnit constructor and moved the SetParameter() functions
>
inside the Initialze() function. This compiles and the
>
sliders/parameters are set just fine. However when the sliders are
>
changed, the processing this does is not affected. Did I misunderstand
>
what the Initialize() function is for?
Parameters should not be initialized in Initialization if at all
possible - that is why they are defined in the constructor (so the
state of parameters is independent of whether the AU is initialized or
not). If you could point out to me where in the documentation you had
drawn this conclusion I'll make sure we fix that to make it more
clear...
- now maybe you can't do any work with a parameter's value until after
you're initialized - that's easy enough:
SetParameter
- store param value
- if initilaized do work
Initialize
- go through and calculate all the stuff you need to for current
parameter values
Bill
>
>
Thank you in advance...
>
>
--
>
Aristotel Digenis
>
email@hidden
>
http://www.digenis.ws
>
_______________________________________________
>
coreaudio-api mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
>
Do not post admin requests to the list. They will be ignored.
>
>
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
Culture Ship Names:
Ravished By The Sheer Implausibility Of That Last Statement [GSV]
I said, I've Got A Big Stick [OU]
Inappropiate Response [OU]
Far Over The Borders Of Insanity And Still Accelerating [Eccentric]
________________________________________________________________________
__
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.