aboutsummaryrefslogtreecommitdiff
path: root/src/init.c
diff options
context:
space:
mode:
authorJamie Bullock <jamie@postlude.co.uk>2007-02-12 17:11:31 +0000
committerJamie Bullock <jamie@postlude.co.uk>2007-02-12 17:11:31 +0000
commitfee193c31a1b1b8cb179413c6fb7f9dc568e756c (patch)
treeea577d828c45d32623f9b43a6278ccf725e4aa42 /src/init.c
parent27eb133e2a213747af105655bf286891e0d69f1e (diff)
downloadLibXtract-fee193c31a1b1b8cb179413c6fb7f9dc568e756c.tar.gz
LibXtract-fee193c31a1b1b8cb179413c6fb7f9dc568e756c.tar.bz2
LibXtract-fee193c31a1b1b8cb179413c6fb7f9dc568e756c.zip
Various minor fixes
Diffstat (limited to 'src/init.c')
-rw-r--r--src/init.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/init.c b/src/init.c
index b7cc99c..09e2d77 100644
--- a/src/init.c
+++ b/src/init.c
@@ -122,16 +122,14 @@ int xtract_init_mfcc(int N, float nyquist, int style, float freq_min, float freq
}
-int xtract_init_bark(int N, float nyquist, int *band_limits){
+int xtract_init_bark(int N, float sr, int *band_limits){
float edges[] = {0, 100, 200, 300, 400, 510, 630, 770, 920, 1080, 1270, 1480, 1720, 2000, 2320, 2700, 3150, 3700, 4400, 5300, 6400, 7700, 9500, 12000, 15500, 20500, 27000}; /* Takes us up to sr = 54kHz (CCRMA: JOS)*/
- int M, bands = XTRACT_BARK_BANDS;
-
- M = N >> 1;
+ int bands = XTRACT_BARK_BANDS;
while(bands--)
- band_limits[bands] = edges[bands] / nyquist * M;
+ band_limits[bands] = edges[bands] / sr * N;
/*FIX shohuld use rounding, but couldn't get it to work */
return XTRACT_SUCCESS;