From 592c723d7fe2dc8794182d6270a127e63f6e2973 Mon Sep 17 00:00:00 2001 From: Jamie Bullock Date: Mon, 29 Jan 2007 11:30:11 +0000 Subject: Added namespacing to enumerations and defines. Made most macros private. --- src/init.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/init.c') 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; } -- cgit v1.2.3