Ignore:
Timestamp:
Aug 12, 2015, 4:15:39 PM (9 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:
df7be43
Parents:
a90e9d4
Message:

examples/: add time format option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/aubioonset.c

    ra90e9d4 r340cb93  
    5050{
    5151  if ( is_onset ) {
    52     outmsg ("%f\n", aubio_onset_get_last_s (o) );
     52    if (strcmp (time_format, "samples") == 0) {
     53      outmsg ("%d\n", aubio_onset_get_last (o) );
     54    } else if (strcmp (time_format, "ms") == 0) {
     55      outmsg ("%f\n", aubio_onset_get_last_ms (o) );
     56    } else {
     57      outmsg ("%f\n", aubio_onset_get_last_s (o) );
     58    }
    5359  }
    5460}
Note: See TracChangeset for help on using the changeset viewer.