MCPcopy Create free account
hub / github.com/FastLED/FastLED / main

Function main

tests/profile/audio/pitch_sweep_test.cpp:359–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357extern "C" void runner_setup_crash_handler();
358
359int main(int argc, char *argv[]) {
360 runner_setup_crash_handler();
361
362 const int SAMPLES = 512;
363 const int BANDS = 64;
364 const float FMIN = Args::DefaultMinFrequency();
365 const float FMAX = Args::DefaultMaxFrequency();
366 const int SAMPLE_RATE = 44100;
367 const int NUM_STEPS = 200;
368
369 bool jsonOutput = (argc > 1 && fl::strcmp(argv[1], "json") == 0);
370
371 if (jsonOutput) {
372 emitJson(SAMPLES, BANDS, FMIN, FMAX, SAMPLE_RATE, NUM_STEPS);
373 } else {
374 emitReport(SAMPLES, BANDS, FMIN, FMAX, SAMPLE_RATE, NUM_STEPS);
375 }
376
377 return 0;
378}

Callers

nothing calls this directly

Calls 4

strcmpFunction · 0.85
emitJsonFunction · 0.85
emitReportFunction · 0.85

Tested by

no test coverage detected