summaryrefslogtreecommitdiff
path: root/audio/toolame/patches/patch-ab
blob: 3dbe44b8288706a8b465b672c28678f748956fe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$NetBSD: patch-ab,v 1.2 2005/07/30 11:30:03 grant Exp $

these patches correct invalid C code that declares variables after statements.

--- psycho_4.c.orig	2003-03-02 11:50:48.000000000 +1100
+++ psycho_4.c
@@ -83,8 +83,8 @@ static F2HBLK *r, *phi_sav;
 
 #define TRIGTABLESIZE 3142
 #define TRIGTABLESCALE 1000.0
-static FLOAT cos_table[TRIGTABLESIZE];
-static FLOAT sin_table[TRIGTABLESIZE];
+FLOAT cos_table[TRIGTABLESIZE];
+FLOAT sin_table[TRIGTABLESIZE];
 void psycho_4_trigtable_init(void) {
 
   int i;
@@ -361,6 +361,7 @@ void psycho_4_init (double sfreq, option
   }  
  
 
+  {
   /* Work out the partitions
      Starting from line 0, all lines within 0.33 of the starting
      bark are added to the same partition. When a line is greater
@@ -381,6 +382,7 @@ void psycho_4_init (double sfreq, option
     /* keep a count of how many frequency lines are in each partition */
     numlines[partition_count]++;
   }
+  }
 
   /* For each partition within the frequency space, 
      calculate the average bark value - cbval [central bark value] */