Changeset 3da8187 for examples/parse_args.h
- Timestamp:
- Dec 7, 2013, 5:22:21 AM (10 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:
- 61ecd1a
- Parents:
- 466dff3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/parse_args.h
r466dff3 r3da8187 63 63 " -h --help display this message\n" 64 64 " -v --verbose be verbose\n" 65 #ifdef HAVE_JACK65 #ifdef PROG_HAS_JACK 66 66 " -j --jack use Jack\n" 67 67 #endif 68 68 " -i --input input type\n" 69 #ifdef PROG_HAS_OUTPUT 69 70 " -o --output output type\n" 71 #endif 70 72 " -r --samplerate select samplerate\n" 71 73 " -B --bufsize set buffer size\n" … … 81 83 #endif /* PROG_HAS_PITCH */ 82 84 " -s --silence select silence threshold\n" 85 #ifdef PROG_HAS_OUTPUT 83 86 " -m --mix-input mix input signal with output signal\n" 87 #endif 84 88 ); 85 89 exit (exit_code); … … 90 94 { 91 95 const char *options = "hv" 92 #ifdef HAVE_JACK 96 "i:r:B:H:" 97 #ifdef PROG_HAS_JACK 93 98 "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 */ 96 103 #ifdef PROG_HAS_ONSET 97 104 "O:t:" … … 105 112 {"help", 0, NULL, 'h'}, 106 113 {"verbose", 0, NULL, 'v'}, 107 #ifdef HAVE_JACK108 {"jack", 0, NULL, 'j'},109 #endif110 114 {"input", 1, NULL, 'i'}, 111 {"output", 1, NULL, 'o'},112 115 {"samplerate", 1, NULL, 'r'}, 113 116 {"bufsize", 1, NULL, 'B'}, 114 117 {"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 */ 115 124 #ifdef PROG_HAS_ONSET 116 125 {"onset", 1, NULL, 'O'}, … … 191 200 while (next_option != -1); 192 201 202 // if unique, use the non option argument as the source 193 203 if ( source_uri == NULL ) { 194 204 if (argc - optind == 1) { … … 203 213 } 204 214 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) { 211 217 #if HAVE_JACK 212 debug ("Jack input output\n");218 verbmsg("No input source given, using jack\n"); 213 219 usejack = 1; 214 220 #else
Note: See TracChangeset
for help on using the changeset viewer.