File alienwah-compile-fix.diff of Package ladspa-alienwah

--- 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; i<delay; ++i) {
+		delaybuf[i] = float_complex(0,0);
+	}
+}
+
+};
 
+
+/*
+ * simply calls the constructor
+ */
+LADSPA_Handle instantiateAW(const LADSPA_Descriptor *,
+			    unsigned long SampleRate)
+{
   return new AW(SampleRate);
 }
 
 /*
  * get all the pointers to our ports data 
  */
-friend void connectPortToAW(LADSPA_Handle instance, unsigned long port,
-	LADSPA_Data * datalocation) {
-
+void connectPortToAW(LADSPA_Handle instance, unsigned long port,
+		     LADSPA_Data * datalocation)
+{
 	switch (port) {
 	case AW_FREQ:
 		((AW *)instance)->lfreq = *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<delay; ++i) {
-		delaybuf[i] = float_complex(0,0);
-	}
+void activateAW(void * pvHandle)
+{
 }
 
 /*
  * Mono effect
  * Do the effect. 'i_buf' is transformed into 'o_buf'
  */
-friend void runAW_Mono(LADSPA_Handle instance, unsigned long samplecount) {
+void runAW_Mono(LADSPA_Handle instance, unsigned long samplecount)
+{
 	AW * me = (AW *)instance;
 	float lfo;
 	float_complex outc;
@@ -239,7 +253,8 @@
 /*
  * Stereo effect?
  */
-friend void runAW_Stereo(LADSPA_Handle instance, unsigned long samplecount) {
+void runAW_Stereo(LADSPA_Handle instance, unsigned long samplecount)
+{
 	AW * me = (AW *)instance;
 	float lfo;
 	float_complex outc;
@@ -274,13 +289,11 @@
 	}
 }
 
-
-friend void cleanupAW(void *pvHandle) {
-  delete (AW *)pvHandle;
+void cleanupAW(void *pvHandle)
+{
+	delete (AW *)pvHandle;
 }
 
-};
-
 /*****************************************************************************/
 
 typedef char * char_ptr;