aboutsummaryrefslogtreecommitdiff
path: root/src/init.c
diff options
context:
space:
mode:
authorJamie Bullock <jamie@postlude.co.uk>2007-01-29 11:30:11 +0000
committerJamie Bullock <jamie@postlude.co.uk>2007-01-29 11:30:11 +0000
commit592c723d7fe2dc8794182d6270a127e63f6e2973 (patch)
tree9359c33fef1c62ab5122df9281baeafa04f4353a /src/init.c
parent64d6de56068584a090e555abf49a16d6bdf97696 (diff)
downloadLibXtract-592c723d7fe2dc8794182d6270a127e63f6e2973.tar.gz
LibXtract-592c723d7fe2dc8794182d6270a127e63f6e2973.tar.bz2
LibXtract-592c723d7fe2dc8794182d6270a127e63f6e2973.zip
Added namespacing to enumerations and defines. Made most macros private.
Diffstat (limited to 'src/init.c')
-rw-r--r--src/init.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/init.c b/src/init.c
index 33422b0..b7cc99c 100644
--- a/src/init.c
+++ b/src/init.c
@@ -46,7 +46,7 @@ int xtract_init_mfcc(int N, float nyquist, int style, float freq_min, float freq
if(mel_peak == NULL || height_norm == NULL ||
lin_peak == NULL || fft_peak == NULL)
- return MALLOC_FAILED;
+ return XTRACT_MALLOC_FAILED;
M = N >> 1;
@@ -64,7 +64,7 @@ int xtract_init_mfcc(int N, float nyquist, int style, float freq_min, float freq
for (n = 0; n < freq_bands; n++){
/*roll out normalised gain of each peak*/
- if (style == EQUAL_GAIN){
+ if (style == XTRACT_EQUAL_GAIN){
height = 1;
norm_fact = norm;
}
@@ -118,7 +118,7 @@ int xtract_init_mfcc(int N, float nyquist, int style, float freq_min, float freq
free(height_norm);
free(fft_peak);
- return SUCCESS;
+ return XTRACT_SUCCESS;
}
@@ -126,7 +126,7 @@ int xtract_init_bark(int N, float nyquist, 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 = BARK_BANDS;
+ int M, bands = XTRACT_BARK_BANDS;
M = N >> 1;
@@ -134,5 +134,5 @@ int xtract_init_bark(int N, float nyquist, int *band_limits){
band_limits[bands] = edges[bands] / nyquist * M;
/*FIX shohuld use rounding, but couldn't get it to work */
- return SUCCESS;
+ return XTRACT_SUCCESS;
}