Ignore:
Timestamp:
Dec 7, 2013, 5:22:21 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:
61ecd1a
Parents:
466dff3
Message:

examples/: remove -o and -j when unused

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/parse_args.h

    r466dff3 r3da8187  
    6363      "       -h      --help             display this message\n"
    6464      "       -v      --verbose          be verbose\n"
    65 #ifdef HAVE_JACK
     65#ifdef PROG_HAS_JACK
    6666      "       -j      --jack             use Jack\n"
    6767#endif
    6868      "       -i      --input            input type\n"
     69#ifdef PROG_HAS_OUTPUT
    6970      "       -o      --output           output type\n"
     71#endif
    7072      "       -r      --samplerate       select samplerate\n"
    7173      "       -B      --bufsize          set buffer size\n"
     
    8183#endif /* PROG_HAS_PITCH */
    8284      "       -s      --silence          select silence threshold\n"
     85#ifdef PROG_HAS_OUTPUT
    8386      "       -m      --mix-input        mix input signal with output signal\n"
     87#endif
    8488      );
    8589  exit (exit_code);
     
    9094{
    9195  const char *options = "hv"
    92 #ifdef HAVE_JACK
     96    "i:r:B:H:"
     97#ifdef PROG_HAS_JACK
    9398    "j"
    94 #endif
    95     "i:o:r:B:H:"
     99#endif /* PROG_HAS_JACK */
     100#ifdef PROG_HAS_OUTPUT
     101    "o:"
     102#endif /* PROG_HAS_OUTPUT */
    96103#ifdef PROG_HAS_ONSET
    97104    "O:t:"
     
    105112    {"help",                  0, NULL, 'h'},
    106113    {"verbose",               0, NULL, 'v'},
    107 #ifdef HAVE_JACK
    108     {"jack",                  0, NULL, 'j'},
    109 #endif
    110114    {"input",                 1, NULL, 'i'},
    111     {"output",                1, NULL, 'o'},
    112115    {"samplerate",            1, NULL, 'r'},
    113116    {"bufsize",               1, NULL, 'B'},
    114117    {"hopsize",               1, NULL, 'H'},
     118#ifdef PROG_HAS_JACK
     119    {"jack",                  0, NULL, 'j'},
     120#endif /* PROG_HAS_JACK */
     121#ifdef PROG_HAS_OUTPUT
     122    {"output",                1, NULL, 'o'},
     123#endif /* PROG_HAS_OUTPUT */
    115124#ifdef PROG_HAS_ONSET
    116125    {"onset",                 1, NULL, 'O'},
     
    191200  while (next_option != -1);
    192201
     202  // if unique, use the non option argument as the source
    193203  if ( source_uri == NULL ) {
    194204    if (argc - optind == 1) {
     
    203213  }
    204214
    205   if (source_uri != NULL) {
    206     debug ("Input file : %s\n", source_uri);
    207   } else if (source_uri != NULL && sink_uri != NULL) {
    208     debug ("Input file : %s\n", source_uri);
    209     debug ("Output file : %s\n", sink_uri);
    210   } else {
     215  // if no source, show a message
     216  if (source_uri == NULL) {
    211217#if HAVE_JACK
    212     debug ("Jack input output\n");
     218    verbmsg("No input source given, using jack\n");
    213219    usejack = 1;
    214220#else
Note: See TracChangeset for help on using the changeset viewer.