Ignore:
Timestamp:
Oct 25, 2009, 9:33:24 PM (15 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:
b616ffe
Parents:
a17e8c9
Message:

examples/: simplify, use fvec_ funcs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/aubiotrack.c

    ra17e8c9 r0e0a049  
    4242      /* block loop */
    4343      aubio_tempo_do (bt,ibuf,tempo_out);
    44       if (tempo_out->data[0][0]>0)
    45         istactus = tempo_out->data[0][0];
    46       else
    47         istactus = 0;
    48       if (tempo_out->data[0][1]>0)
    49         isonset = tempo_out->data[0][0];
    50       else
    51         isonset = 0;
    52       if (istactus) {
    53               for (pos = 0; pos < overlap_size; pos++)
    54                       obuf->data[0][pos] = woodblock->data[0][pos];
     44      istactus = fvec_read_sample (tempo_out, 0, 0);
     45      isonset = fvec_read_sample (tempo_out, 0, 1);
     46      if (istactus > 0.) {
     47        fvec_copy (woodblock, obuf);
    5548      } else {
    56               for (pos = 0; pos < overlap_size; pos++)
    57                       obuf->data[0][pos] = 0.;
     49        fvec_zeros (obuf);
    5850      }
    5951      /* end of block loop */
Note: See TracChangeset for help on using the changeset viewer.