Ignore:
Timestamp:
Aug 12, 2015, 4:31:40 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
3ff50e5
Parents:
340cb93
Message:

examples/parse_args.h: only parse time format string once, warn if unknown

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/parse_args.h

    r340cb93 rdf7be43  
    3636extern smpl_t pitch_tolerance;
    3737// time stuff
    38 extern char_t * time_format;
     38extern uint_t time_format;
    3939// tempo stuff
    4040extern char_t * tempo_method;
     
    209209        break;
    210210      case 'T':
    211         time_format = optarg;
     211        if (strcmp (optarg, "samples") == 0) {
     212          time_format = 2;
     213        } else if (strcmp (optarg, "ms") == 0) {
     214          time_format = 1;
     215        } else if (strcmp (optarg, "seconds") == 0) {
     216          time_format = 0;
     217        } else {
     218          errmsg ("Warning: did not get '%s' time-format string\n", optarg);
     219        }
    212220        break;
    213221      case 's':                /* silence threshold */
Note: See TracChangeset for help on using the changeset viewer.