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

From: Steve Harris <S.W.Harris@email-addr-hidden>
Date: Mon Jul 11 2005 - 16:04:07 EEST

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
Received on Mon Jul 11 20:15:05 2005

This archive was generated by hypermail 2.1.8 : Mon Jul 11 2005 - 20:15:07 EEST