Ignore:
Timestamp:
09/28/06 18:15:21 (18 years ago)
Author:
r2d
Message:

added a PsyModel struct, too much members in it. some will be removed later

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mppenc/branches/r2d/libmpcpsy/cvd.c

    r59 r60  
    1818 */
    1919
    20 #include "mppenc.h"
     20#include "libmpcpsy.h"
     21
     22#include <math.h>
     23#include <string.h>
     24
    2125
    2226/* C O N S T A N T S */
     
    7276// Analyze the Cepstrum, search for the basic harmonic
    7377static void
    74 CEP_Analyse2048 ( float* res1,
     78CEP_Analyse2048 ( PsyModel* m,
     79                                  float* res1,
    7580                  float* res2,
    7681                  float* qual1,
     
    163168        *res1 = line_sum / sum;
    164169
    165     if ( CVD_used < 2 )
     170    if ( m->CVD_used < 2 )
    166171        return;
    167172
     
    231236// output: Array *vocal contains information if the FFT-Line is a harmonic component
    232237int
    233 CVD2048 ( const float* spec, int* vocal )
     238CVD2048 ( PsyModel* m, const float* spec, int* vocal )
    234239{
    235240    static float  cep [4096];     // cep[4096] -- array, which is also used for the 2048 FFT
     
    241246    int           n;
    242247
    243     ENTER(20);
    244248    // Calculating logarithmated, windowed spectrum cep[]
    245249    // cep[512...1024] = 0 -- cep[1025...2047] doesn't matter, because the first have to be filled by fft
     
    255259
    256260    // search the harmonic
    257     CEP_Analyse2048 ( &res1, &res2, &qual1, &qual2, cep );
     261        CEP_Analyse2048 ( m, &res1, &res2, &qual1, &qual2, cep );
    258262//#include "cvd.h"
    259263    if ( res1 > 0.f  ||  res2 > 0.f ) {
    260264        if ( res1 > 0. ) SetVoiceLines ( vocal, res1, 100 );
    261265        if ( res2 > 0. ) SetVoiceLines ( vocal, res2,  20 );
    262         LEAVE(20);
    263266        return 1;
    264267    }
    265     LEAVE(20);
    266268    return 0;
    267269}
Note: See TracChangeset for help on using the changeset viewer.