diff options
Diffstat (limited to 'src/plugins/noise.c')
-rw-r--r-- | src/plugins/noise.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/plugins/noise.c b/src/plugins/noise.c index 0fdd938..4068b5c 100644 --- a/src/plugins/noise.c +++ b/src/plugins/noise.c @@ -16,6 +16,7 @@ /*****************************************************************************/ #include "ladspa.h" +#include "utils.h" /*****************************************************************************/ @@ -48,7 +49,7 @@ typedef struct { /*****************************************************************************/ /* Construct a new plugin instance. */ -LADSPA_Handle +static LADSPA_Handle instantiateNoiseSource(const LADSPA_Descriptor * Descriptor, unsigned long SampleRate) { return malloc(sizeof(NoiseSource)); @@ -57,7 +58,7 @@ instantiateNoiseSource(const LADSPA_Descriptor * Descriptor, /*****************************************************************************/ /* Connect a port to a data location. */ -void +static void connectPortToNoiseSource(LADSPA_Handle Instance, unsigned long Port, LADSPA_Data * DataLocation) { @@ -74,7 +75,7 @@ connectPortToNoiseSource(LADSPA_Handle Instance, /*****************************************************************************/ /* Run a delay line instance for a block of SampleCount samples. */ -void +static void runNoiseSource(LADSPA_Handle Instance, unsigned long SampleCount) { @@ -97,7 +98,7 @@ runNoiseSource(LADSPA_Handle Instance, /* Run a delay line instance for a block of SampleCount samples. *ADD* the output to the output buffer. */ -void +static void runAddingNoiseSource(LADSPA_Handle Instance, unsigned long SampleCount) { @@ -120,7 +121,7 @@ runAddingNoiseSource(LADSPA_Handle Instance, /*****************************************************************************/ -void +static void setNoiseSourceRunAddingGain(LADSPA_Handle Instance, LADSPA_Data Gain) { ((NoiseSource *)Instance)->m_fRunAddingGain = Gain; @@ -129,21 +130,19 @@ setNoiseSourceRunAddingGain(LADSPA_Handle Instance, /*****************************************************************************/ /* Throw away a simple delay line. */ -void +static void cleanupNoiseSource(LADSPA_Handle Instance) { free(Instance); } /*****************************************************************************/ -LADSPA_Descriptor * g_psDescriptor; +static LADSPA_Descriptor * g_psDescriptor; /*****************************************************************************/ -/* _init() is called automatically when the plugin library is first - loaded. */ -void -_init() { +/* Called automatically when the plugin library is first loaded. */ +ON_LOAD_ROUTINE { char ** pcPortNames; LADSPA_PortDescriptor * piPortDescriptors; @@ -218,9 +217,8 @@ _init() { /*****************************************************************************/ -/* _fini() is called automatically when the library is unloaded. */ -void -_fini() { +/* Called automatically when the library is unloaded. */ +ON_UNLOAD_ROUTINE { long lIndex; if (g_psDescriptor) { free((char *)g_psDescriptor->Label); |