Changeset 3091:9da1d1d068c8 in roaraudio
- Timestamp:
- 01/09/10 11:44:29 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarvumeter.c
r3028 r3091 32 32 #define BUFSIZE 1024 33 33 34 #define LOWPASS_ORDER 6 35 34 36 #define MODE_NONE 0x00 35 37 #define MODE_PC 0x01 … … 46 48 " --bits BITS - Set bits per sample\n" 47 49 " --chans CHANNELS - Set number of channels\n" 48 " --samples SAMPLES - Set number of samples\n" 49 " --help - Show this help\n" 50 " --samples SAMPLES - Set number of input samples per block\n" 51 " --pc - Use percent scale\n" 52 " --db - Use dB scale\n" 53 " --beat - Enable beat detection\n" 54 " --lowpass FREQ - Use lowpass to filter input (-%idB/dec)\n" 55 " --help - Show this help\n", 56 LOWPASS_ORDER * 20 50 57 ); 51 58 … … 173 180 } else if ( strcmp(k, "--bits") == 0 ) { 174 181 bits = atoi(argv[++i]); 175 } else if ( strcmp(k, "--channels") == 0 ) {182 } else if ( strcmp(k, "--channels") == 0 || strcmp(k, "--chans") == 0) { 176 183 channels = atoi(argv[++i]); 177 184 } else if ( strcmp(k, "--samples") == 0 ) { 178 185 samples = atoi(argv[++i]); 179 186 } else if ( strcmp(k, "--db") == 0 ) { 187 mode |= MODE_PC; 188 mode -= MODE_PC; 180 189 mode |= MODE_DB; 190 } else if ( strcmp(k, "--pc") == 0 ) { 191 mode |= MODE_DB; 192 mode -= MODE_DB; 193 mode |= MODE_PC; 181 194 } else if ( strcmp(k, "--beat") == 0 ) { 182 195 mode |= MODE_BEAT; … … 222 235 223 236 if ( lowpass_freq > 1 ) { 224 for (i = 0; i < 6; i++) {237 for (i = 0; i < LOWPASS_ORDER; i++) { 225 238 if ( roardsp_filter_new(&filter, &s, ROARDSP_FILTER_LOWP) == -1 ) { 226 239 fprintf(stderr, "Error: can not open lowpass\n");
Note: See TracChangeset
for help on using the changeset viewer.