Changeset 088760e for examples/parse_args.h
- Timestamp:
- Oct 31, 2018, 10:26:52 PM (6 years ago)
- Branches:
- feature/constantq
- Children:
- c03d191
- Parents:
- 45c2c5c (diff), 7a54b37 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/parse_args.h
r45c2c5c r088760e 48 48 // more general stuff 49 49 extern smpl_t silence_threshold; 50 extern smpl_t release_drop; 50 51 extern uint_t mix_input; 51 52 // midi tap … … 65 66 extern int blocks; 66 67 67 extern fvec_t *i buf;68 extern fvec_t *o buf;68 extern fvec_t *input_buffer; 69 extern fvec_t *output_buffer; 69 70 70 71 const char *prog_name; … … 98 99 #ifdef PROG_HAS_PITCH 99 100 " -p --pitch select pitch detection algorithm\n" 100 " <default|yinfft|yin |mcomb|fcomb|schmitt>; default=yinfft\n"101 " <default|yinfft|yinfast|yin|mcomb|fcomb|schmitt>; default=yinfft\n" 101 102 " -u --pitch-unit select pitch output unit\n" 102 103 " <default|freq|hertz|Hz|midi|cent|bin>; default=freq\n" … … 108 109 " a value in dB, for instance -70, or -100; default=-90\n" 109 110 #endif /* PROG_HAS_SILENCE */ 111 #ifdef PROG_HAS_NOTES 112 " -d --release-drop select release drop threshold\n" 113 " a positive value in dB; default=10\n" 114 #endif 110 115 " -T --time-format select time values output format\n" 111 116 " (samples, ms, seconds) default=seconds\n" … … 158 163 "s:" 159 164 #endif /* PROG_HAS_SILENCE */ 165 #ifdef PROG_HAS_NOTES 166 "d:" 167 #endif /* PROG_HAS_SILENCE */ 160 168 #ifdef PROG_HAS_OUTPUT 161 169 "mf" … … 193 201 {"silence", 1, NULL, 's'}, 194 202 #endif /* PROG_HAS_SILENCE */ 203 #ifdef PROG_HAS_NOTES 204 {"release-drop", 1, NULL, 'd'}, 205 #endif /* PROG_HAS_NOTES */ 195 206 {"time-format", 1, NULL, 'T'}, 196 207 #ifdef PROG_HAS_OUTPUT … … 201 212 }; 202 213 #endif /* HAVE_GETOPT_H */ 203 prog_name = argv[0];214 // better safe than sorry 204 215 if (argc < 1) { 205 216 usage (stderr, 1); 206 return -1;207 }217 } 218 prog_name = argv[0]; 208 219 #ifdef HAVE_GETOPT_H 209 220 do { … … 274 285 case 's': /* silence threshold */ 275 286 silence_threshold = (smpl_t) atof (optarg); 287 break; 288 case 'd': /* release-drop threshold */ 289 release_drop = (smpl_t) atof (optarg); 276 290 break; 277 291 case 'm': /* mix_input flag */
Note: See TracChangeset
for help on using the changeset viewer.