Changeset 6427e6d


Ignore:
Timestamp:
Oct 30, 2007, 3:39:11 AM (17 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
36fa6cb
Parents:
6d4ec49
Message:

use local comments in test-fft.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/src/test-fft.c

    r6d4ec49 r6427e6d  
    99int main(){
    1010        uint_t i,j;
    11         /* allocate some memory */
    12         uint_t win_s      = 1024;                       /* window size */
    13         uint_t channels   = 1;                          /* number of channel */
    14         fvec_t * in       = new_fvec (win_s, channels); /* input buffer */
    15         cvec_t * fftgrain = new_cvec (win_s, channels); /* fft norm and phase */
    16         fvec_t * out      = new_fvec (win_s, channels); /* output buffer */
     11        uint_t win_s      = 1024;                       // window size
     12        uint_t channels   = 1;                          // number of channel
     13        fvec_t * in       = new_fvec (win_s, channels); // input buffer
     14        cvec_t * fftgrain = new_cvec (win_s, channels); // fft norm and phase
     15        fvec_t * out      = new_fvec (win_s, channels); // output buffer
    1716 
    18         /* allocate fft and other memory space */
    19         aubio_fft_t * fft      = new_aubio_fft(win_s);      /* fft interface */
    20         smpl_t * w             = NEW_ARRAY(smpl_t,win_s); /* window */
    21         /* complex spectral data */
     17        // allocate fft and other memory space
     18        aubio_fft_t * fft      = new_aubio_fft(win_s);    // fft interface
     19        smpl_t * w             = NEW_ARRAY(smpl_t,win_s); // window
     20        // complex spectral data
    2221        fft_data_t ** spec     = NEW_ARRAY(fft_data_t*,channels);
    2322        for (i=0; i < channels; i++)
    2423                spec[i] = NEW_ARRAY(fft_data_t,win_s);
    25         /* initialize the window (see mathutils.c) */
     24        // initialize the window (see mathutils.c)
    2625        aubio_window(w,win_s,aubio_win_hanningz);
    2726 
    28         /* fill input with some data */
     27        // fill input with some data
    2928        in->data[0][win_s/2] = 1;
    3029 
    31         /* execute stft */
     30        // execute stft
    3231        for (i=0; i < channels; i++) {
    3332                aubio_fft_do (fft,in->data[i],spec[i],win_s);
    34                 /* put norm and phase into fftgrain */
     33                // put norm and phase into fftgrain
    3534                aubio_fft_getnorm(fftgrain->norm[i], spec[i], win_s/2+1);
    3635                aubio_fft_getphas(fftgrain->phas[i], spec[i], win_s/2+1);
    3736        }
    3837 
    39         /* execute inverse fourier transform */
     38        // execute inverse fourier transform
    4039        for (i=0; i < channels; i++) {
    4140                for (j=0; j<win_s/2+1; j++) {
Note: See TracChangeset for help on using the changeset viewer.