--- aw.cpp-dist 2005-10-05 12:17:23.000000000 +0200 +++ aw.cpp 2005-10-05 12:19:57.000000000 +0200 @@ -140,21 +140,57 @@ c2(float_complex(0,0)) { } +friend LADSPA_Handle instantiateAW(const LADSPA_Descriptor *, + unsigned long SampleRate); +friend void connectPortToAW(LADSPA_Handle instance, unsigned long port, + LADSPA_Data * datalocation); +friend void activateAW(void * pvHandle); +friend void runAW_Mono(LADSPA_Handle instance, unsigned long samplecount); +friend void runAW_Stereo(LADSPA_Handle instance, unsigned long samplecount); +friend void cleanupAW(void *pvHandle); + /* - * simply calls the constructor + * Munge some things based upon the settings passed. Set + * initial state. */ -friend LADSPA_Handle instantiateAW(const LADSPA_Descriptor *, - unsigned long SampleRate) { +void initState(int chans) { + inited = true; + freq = (float)lfreq; + feedback = ((float)lfeedback)/4 + 0.74; // whyfor? + if (feedback>0.999) feedback=0.999; + if (ldelay < 0) ldelay = 1; + // swh I think this is wrong delay = (unsigned int) (ldelay * samplerate * NORM); + delay = (unsigned int) ldelay; +printf("delay %d\n", delay); + if (delay < 1) delay = 1; + if (delay > MAX_DELAY) delay = MAX_DELAY; + delaybuf = new float_complex[delay]; + if (chans == 2) { + delaybuf2 = new float_complex[MAX_DELAY+1]; + } + for (unsigned int i =0; ilfreq = *datalocation; @@ -183,38 +219,16 @@ * connect_port may be called before of after here, so we * cannot rely upon port data for initialization */ -friend void activateAW(void * pvHandle) { -} - -/* - * Munge some things based upon the settings passed. Set - * initial state. - */ -void initState(int chans) { - inited = true; - freq = (float)lfreq; - feedback = ((float)lfeedback)/4 + 0.74; // whyfor? - if (feedback>0.999) feedback=0.999; - if (ldelay < 0) ldelay = 1; - // swh I think this is wrong delay = (unsigned int) (ldelay * samplerate * NORM); - delay = (unsigned int) ldelay; -printf("delay %d\n", delay); - if (delay < 1) delay = 1; - if (delay > MAX_DELAY) delay = MAX_DELAY; - delaybuf = new float_complex[delay]; - if (chans == 2) { - delaybuf2 = new float_complex[MAX_DELAY+1]; - } - for (unsigned int i =0; i