Ignore:
Timestamp:
Dec 8, 2013, 5:51:09 AM (10 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:
664fd25
Parents:
a93dab3
Message:

examples/: check if sink_uri exists, add -f to force overwrite

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/parse_args.h

    ra93dab3 r0a509c6  
    4141extern uint_t mix_input;
    4242
     43extern uint_t force_overwrite;
     44
    4345// functions defined in utils.c
    4446extern void examples_common_init (int argc, char **argv);
     
    7981#ifdef PROG_HAS_OUTPUT
    8082      "       -m      --mix-input        mix input signal with output signal\n"
     83      "       -f      --force-overwrite  overwrite output file if\n"
    8184#endif
    8285#ifdef PROG_HAS_JACK
     
    106109    "p:u:l:"
    107110#endif /* PROG_HAS_PITCH */
    108     "s:m";
     111    "s:mf";
    109112  int next_option;
    110113  struct option long_options[] = {
     
    132135    {"silence",               1, NULL, 's'},
    133136    {"mix-input",             0, NULL, 'm'},
     137    {"force-overwrite",       0, NULL, 'f'},
    134138    {NULL,                    0, NULL, 0}
    135139  };
     
    156160      case 'o':
    157161        sink_uri = optarg;
     162        break;
     163      case 'f':                /* force_overwrite flag */
     164        force_overwrite = 1;
    158165        break;
    159166      case 'r':
Note: See TracChangeset for help on using the changeset viewer.