[linux-audio-dev] LADSPA: getting sample rate

Steve Harris S.W.Harris at ecs.soton.ac.uk
Mon Jul 11 13:04:07 UTC 2005


On Mon, Jul 11, 2005 at 03:43:50 +0300, Artemio wrote:
> 
> > You have to initialise the value in MyPlugin when you
> > create that struct inside instantiate().
> Thanks, Fons!
> 
> I have:
> 
> LADSPA_Handle instantiateMyPlugin(const LADSPA_Descriptor * 
> Descriptor, unsigned long SampleRate) {
> 
> 	return malloc(sizeof(MyPlugin));
> 	
> }

You need

	MyPlugin *mp = calloc(sizeof(MyPlugin), 1);

	mp->sampleRate = sampleRate;

	return mp;

- Steve



More information about the Linux-audio-dev mailing list