Changeset df7be43 for examples/utils.c
- Timestamp:
- Aug 12, 2015, 4:31:40 PM (9 years ago)
- 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:
- 3ff50e5
- Parents:
- 340cb93
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/utils.c
r340cb93 rdf7be43 49 49 smpl_t pitch_tolerance = 0.0; // will be set if != 0. 50 50 // time stuff 51 char_t * time_format = "seconds"; 51 uint_t time_format = 0; // for "seconds", 1 for "ms", 2 for "samples" 52 52 // tempo stuff 53 53 char_t * tempo_method = "default"; … … 210 210 void print_time (uint_t time_in_samples) { 211 211 /* output times in selected format */ 212 if ( strcmp (time_format, "samples") == 0) {212 if (time_format == 2) { 213 213 outmsg ("%d", time_in_samples); 214 } else if ( strcmp (time_format, "ms") == 0) {214 } else if (time_format == 1) { 215 215 outmsg ("%f", 1000. * time_in_samples / (float) samplerate); 216 216 } else {
Note: See TracChangeset
for help on using the changeset viewer.