| 153 | } |
| 154 | |
| 155 | bool parse_command_line(int argc, char *argv[]) |
| 156 | { |
| 157 | for(int i = 1; i < argc; i++) |
| 158 | { |
| 159 | char* argument; |
| 160 | char* value; |
| 161 | |
| 162 | //argument = strtok_r(argv[i], "=", &value); |
| 163 | |
| 164 | if (strcmp(argument, "help") == 0) |
| 165 | { |
| 166 | printf("\r\n"); |
| 167 | printf("Available command line commands:\r\n"); |
| 168 | printf(" help - Display this message and quit\r\n"); |
| 169 | //printf(" nogui - Run visualizer with no GUI\r\n"); |
| 170 | printf(" startminimized - Start in system tray\r\n"); |
| 171 | printf("\r\n"); |
| 172 | printf("Available command line arguments:\r\n"); |
| 173 | printf(" Usage: argument1=value1 argument2=value2 ...\r\n"); |
| 174 | printf("\r\n"); |
| 175 | printf(" amplitude - Adjust the amplitude of the visualizer\r\n"); |
| 176 | printf(" bkgd_bright - Adjust the background brightness\r\n"); |
| 177 | printf(" avg_size - Number of points to average\r\n"); |
| 178 | printf(" decay - Percentage of value to decay every step\r\n"); |
| 179 | printf(" delay - Milliseconds between each device update\r\n"); |
| 180 | printf(" nrml_ofst - Normalization offset, floating point value\r\n"); |
| 181 | printf(" nrml_scl - Normalization scale, floating point value\r\n"); |
| 182 | printf(" fltr_const - Low pass filter constant, floating point value 0-1\r\n"); |
| 183 | printf(" window_mode - FFT windowing mode selector, values are:\r\n"); |
| 184 | printf(" - 0: No windowing\r\n"); |
| 185 | printf(" - 1: Hanning window\r\n"); |
| 186 | printf(" - 2: Hamming window\r\n"); |
| 187 | printf(" - 3: Blackman window\r\n"); |
| 188 | printf(" bkgd_mode - Background mode, values are:\r\n"); |
| 189 | for (int i = 0; i < VISUALIZER_NUM_PATTERNS; i++) |
| 190 | { |
| 191 | if (i < 10) |
| 192 | { |
| 193 | printf(" - %d %s\r\n", i, visualizer_pattern_labels[i]); |
| 194 | } |
| 195 | else |
| 196 | { |
| 197 | printf(" - %d %s\r\n", i, visualizer_pattern_labels[i]); |
| 198 | } |
| 199 | } |
| 200 | printf(" frgd_mode - Foreground mode, values are:\r\n"); |
| 201 | for (int i = 0; i < VISUALIZER_NUM_PATTERNS; i++) |
| 202 | { |
| 203 | if (i < 10) |
| 204 | { |
| 205 | printf(" - %d %s\r\n", i, visualizer_pattern_labels[i]); |
| 206 | } |
| 207 | else |
| 208 | { |
| 209 | printf(" - %d %s\r\n", i, visualizer_pattern_labels[i]); |
| 210 | } |
| 211 | } |
| 212 | printf(" single_color_mode - Single color mode, values are:\r\n"); |
no test coverage detected