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

Alfons Adriaensen fons.adriaensen at alcatel.be
Mon Jul 11 12:01:54 UTC 2005


On Mon, Jul 11, 2005 at 02:49:22PM +0300, Artemio wrote:
> 
> > Youre passed it as a paramter when your instantiated, just stash it
> > in the struct.
> Thanks for your help!
> 
> But... I have added:
> 
> typedef struct {
> 	unsigned long SampleRate;
> 	...
> } MyPlugin;
> 
> and then in runMyPlugin:
> 
> ...
> unsigned long fSampleRate
> ...
> fSampleRate = psMyPlugin->SampleRate;
> ...
> 
> But fSampleRate is always at 0... What am I missing?

You have to initialise the value in MyPlugin when you
create that struct inside instantiate().

-- 
FA








More information about the Linux-audio-dev mailing list