Changeset 60 for mppenc/branches/r2d/libmpcpsy/cvd.c
- Timestamp:
- 09/28/06 18:15:21 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mppenc/branches/r2d/libmpcpsy/cvd.c
r59 r60 18 18 */ 19 19 20 #include "mppenc.h" 20 #include "libmpcpsy.h" 21 22 #include <math.h> 23 #include <string.h> 24 21 25 22 26 /* C O N S T A N T S */ … … 72 76 // Analyze the Cepstrum, search for the basic harmonic 73 77 static void 74 CEP_Analyse2048 ( float* res1, 78 CEP_Analyse2048 ( PsyModel* m, 79 float* res1, 75 80 float* res2, 76 81 float* qual1, … … 163 168 *res1 = line_sum / sum; 164 169 165 if ( CVD_used < 2 )170 if ( m->CVD_used < 2 ) 166 171 return; 167 172 … … 231 236 // output: Array *vocal contains information if the FFT-Line is a harmonic component 232 237 int 233 CVD2048 ( const float* spec, int* vocal )238 CVD2048 ( PsyModel* m, const float* spec, int* vocal ) 234 239 { 235 240 static float cep [4096]; // cep[4096] -- array, which is also used for the 2048 FFT … … 241 246 int n; 242 247 243 ENTER(20);244 248 // Calculating logarithmated, windowed spectrum cep[] 245 249 // cep[512...1024] = 0 -- cep[1025...2047] doesn't matter, because the first have to be filled by fft … … 255 259 256 260 // search the harmonic 257 CEP_Analyse2048 (&res1, &res2, &qual1, &qual2, cep );261 CEP_Analyse2048 ( m, &res1, &res2, &qual1, &qual2, cep ); 258 262 //#include "cvd.h" 259 263 if ( res1 > 0.f || res2 > 0.f ) { 260 264 if ( res1 > 0. ) SetVoiceLines ( vocal, res1, 100 ); 261 265 if ( res2 > 0. ) SetVoiceLines ( vocal, res2, 20 ); 262 LEAVE(20);263 266 return 1; 264 267 } 265 LEAVE(20);266 268 return 0; 267 269 }
Note: See TracChangeset
for help on using the changeset viewer.