diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/pitch_detector.c | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/apps/plugins/pitch_detector.c b/apps/plugins/pitch_detector.c index eb3b56ca92..c1d0cff50a 100644 --- a/apps/plugins/pitch_detector.c +++ b/apps/plugins/pitch_detector.c | |||
@@ -364,14 +364,6 @@ void tuner_settings_reset(struct tuner_settings* settings) | |||
364 | 364 | ||
365 | /*---------------------------------------------------------------------*/ | 365 | /*---------------------------------------------------------------------*/ |
366 | 366 | ||
367 | void tuner_settings_reset_query(int yes) | ||
368 | { | ||
369 | if(yes) | ||
370 | tuner_settings_reset(&tuner_settings); | ||
371 | } | ||
372 | |||
373 | /*---------------------------------------------------------------------*/ | ||
374 | |||
375 | enum settings_file_status tuner_settings_load(struct tuner_settings* settings, | 367 | enum settings_file_status tuner_settings_load(struct tuner_settings* settings, |
376 | char* filename) | 368 | char* filename) |
377 | { | 369 | { |
@@ -465,12 +457,6 @@ static const struct opt_items accidental_text[] = | |||
465 | { "Sharp", -1 }, | 457 | { "Sharp", -1 }, |
466 | }; | 458 | }; |
467 | 459 | ||
468 | static const struct opt_items noyes_text[] = | ||
469 | { | ||
470 | { "No", -1 }, | ||
471 | { "Yes", -1 } | ||
472 | }; | ||
473 | |||
474 | void set_min_freq(int new_freq) | 460 | void set_min_freq(int new_freq) |
475 | { | 461 | { |
476 | tuner_settings.sample_size = freq2period(new_freq) * 4; | 462 | tuner_settings.sample_size = freq2period(new_freq) * 4; |
@@ -533,9 +519,8 @@ bool main_menu(void) | |||
533 | rb->set_option( | 519 | rb->set_option( |
534 | "Algorithm Pickiness (Lower -> more discriminating)", | 520 | "Algorithm Pickiness (Lower -> more discriminating)", |
535 | &tuner_settings.yin_threshold, | 521 | &tuner_settings.yin_threshold, |
536 | INT, yin_threshold_text, | 522 | INT, yin_threshold_text, |
537 | sizeof(yin_threshold_text) / | 523 | sizeof(yin_threshold_text) / sizeof(yin_threshold_text[0]), |
538 | sizeof(yin_threshold_text[0]), | ||
539 | NULL); | 524 | NULL); |
540 | break; | 525 | break; |
541 | case 5: | 526 | case 5: |
@@ -544,9 +529,8 @@ bool main_menu(void) | |||
544 | BOOL, accidental_text, 2, NULL); | 529 | BOOL, accidental_text, 2, NULL); |
545 | break; | 530 | break; |
546 | case 6: | 531 | case 6: |
547 | rb->set_option("Display Frequency (Hz)", | 532 | rb->set_bool("Display Frequency (Hz)", |
548 | &tuner_settings.display_hz, | 533 | &tuner_settings.display_hz); |
549 | BOOL, noyes_text, 2, NULL); | ||
550 | break; | 534 | break; |
551 | case 7: | 535 | case 7: |
552 | freq_val = freq_A[tuner_settings.freq_A].frequency; | 536 | freq_val = freq_A[tuner_settings.freq_A].frequency; |
@@ -558,9 +542,9 @@ bool main_menu(void) | |||
558 | break; | 542 | break; |
559 | case 8: | 543 | case 8: |
560 | reset = false; | 544 | reset = false; |
561 | rb->set_option("Reset Tuner Settings?", | 545 | rb->set_bool("Reset Tuner Settings?", &reset); |
562 | &reset, | 546 | if (reset) |
563 | BOOL, noyes_text, 2, tuner_settings_reset_query); | 547 | tuner_settings_reset(&tuner_settings); |
564 | break; | 548 | break; |
565 | case 9: | 549 | case 9: |
566 | exit_tuner = true; | 550 | exit_tuner = true; |