Changes in / [be6e8e6:299dbfd]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/onset/onset.c

    rbe6e8e6 r299dbfd  
    8181    }
    8282  } else {
    83     // we are at the beginning of the file
    84     if (o->total_frames <= o->delay) {
    85       // and we don't find silence
    86       if (aubio_silence_detection(input, o->silence) == 0) {
    87         uint_t new_onset = o->total_frames;
    88         if (o->total_frames == 0 || o->last_onset + o->minioi < new_onset) {
    89           isonset = o->delay / o->hop_size;
    90           o->last_onset = o->total_frames + o->delay;
    91         }
    92       }
     83    // we are at the beginning of the file, and we don't find silence
     84    if (o->total_frames <= o->delay && o->last_onset < o ->minioi && aubio_silence_detection(input, o->silence) == 0) {
     85      //AUBIO_DBG ("beginning of file is not silent, marking as onset\n");
     86      isonset = o->delay / o->hop_size;
     87      o->last_onset = o->delay;
    9388    }
    9489  }
Note: See TracChangeset for help on using the changeset viewer.