Changeset 9499a546


Ignore:
Timestamp:
Mar 29, 2005, 6:04:29 PM (20 years ago)
Author:
Paul Brossier <piem@altern.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:
62c6075
Parents:
19b56b0
Message:

aubioonset.c correct onset output when t-4<0

thanks goes to Hamisch Allan for spotting this

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/aubioonset.c

    r19b56b0 r9499a546  
    174174       * actual onset */
    175175      if (isonset && output_filename == NULL) {
    176         outmsg("%f\n",(frames-4)*overlap_size/(float)samplerate);
     176        if(frames >= 4) {
     177          outmsg("%f\n",(frames-4)*overlap_size/(float)samplerate);
     178        } else if (frames < 4) {
     179          outmsg("%f\n",0.);
     180        }
    177181      }
    178182      if (output_filename != NULL) {
Note: See TracChangeset for help on using the changeset viewer.