diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/recorder/radio.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c index e7a5912235..fab341f99c 100644 --- a/apps/recorder/radio.c +++ b/apps/recorder/radio.c | |||
@@ -1496,30 +1496,32 @@ int radio_menu_cb(int key, int m) | |||
1496 | } | 1496 | } |
1497 | 1497 | ||
1498 | #ifndef SIMULATOR | 1498 | #ifndef SIMULATOR |
1499 | #if defined(HAVE_FMRADIO_IN) || CONFIG_CODEC != SWCODEC | 1499 | #ifdef HAVE_RECORDING |
1500 | |||
1501 | #if defined(HAVE_FMRADIO_IN) && CONFIG_CODEC == SWCODEC | ||
1502 | #define FM_RECORDING_SCREEN | ||
1500 | static bool fm_recording_screen(void) | 1503 | static bool fm_recording_screen(void) |
1501 | { | 1504 | { |
1502 | bool ret; | 1505 | bool ret; |
1503 | 1506 | ||
1504 | #ifdef HAVE_FMRADIO_IN | ||
1505 | /* switch recording source to FMRADIO for the duration */ | 1507 | /* switch recording source to FMRADIO for the duration */ |
1506 | int rec_source = global_settings.rec_source; | 1508 | int rec_source = global_settings.rec_source; |
1507 | global_settings.rec_source = AUDIO_SRC_FMRADIO; | 1509 | global_settings.rec_source = AUDIO_SRC_FMRADIO; |
1508 | 1510 | ||
1509 | /* clearing queue seems to cure a spontaneous abort during record */ | 1511 | /* clearing queue seems to cure a spontaneous abort during record */ |
1510 | while (button_get(false) != BUTTON_NONE); | 1512 | while (button_get(false) != BUTTON_NONE); |
1511 | #endif | ||
1512 | 1513 | ||
1513 | ret = recording_screen(true); | 1514 | ret = recording_screen(true); |
1514 | 1515 | ||
1515 | #ifdef HAVE_FMRADIO_IN | ||
1516 | /* safe to reset as changing sources is prohibited here */ | 1516 | /* safe to reset as changing sources is prohibited here */ |
1517 | global_settings.rec_source = rec_source; | 1517 | global_settings.rec_source = rec_source; |
1518 | #endif | ||
1519 | 1518 | ||
1520 | return ret; | 1519 | return ret; |
1521 | } | 1520 | } |
1521 | #endif /* defined(HAVE_FMRADIO_IN) && CONFIG_CODEC == SWCODEC */ | ||
1522 | 1522 | ||
1523 | #if defined(HAVE_FMRADIO_IN) || CONFIG_CODEC != SWCODEC | ||
1524 | #define FM_RECORDING_SETTINGS | ||
1523 | static bool fm_recording_settings(void) | 1525 | static bool fm_recording_settings(void) |
1524 | { | 1526 | { |
1525 | bool ret = recording_menu(true); | 1527 | bool ret = recording_menu(true); |
@@ -1538,7 +1540,8 @@ static bool fm_recording_settings(void) | |||
1538 | 1540 | ||
1539 | return ret; | 1541 | return ret; |
1540 | } | 1542 | } |
1541 | #endif | 1543 | #endif /* defined(HAVE_FMRADIO_IN) || CONFIG_CODEC != SWCODEC */ |
1544 | #endif /* HAVE_RECORDING */ | ||
1542 | #endif /* SIMULATOR */ | 1545 | #endif /* SIMULATOR */ |
1543 | 1546 | ||
1544 | 1547 | ||
@@ -1566,11 +1569,11 @@ bool radio_menu(void) | |||
1566 | #endif | 1569 | #endif |
1567 | { region_menu_string , toggle_region_mode }, | 1570 | { region_menu_string , toggle_region_mode }, |
1568 | { ID2P(LANG_SOUND_SETTINGS) , sound_menu }, | 1571 | { ID2P(LANG_SOUND_SETTINGS) , sound_menu }, |
1569 | #ifndef SIMULATOR | 1572 | #ifdef FM_RECORDING_SCREEN |
1570 | #if defined(HAVE_FMRADIO_IN) || CONFIG_CODEC != SWCODEC | ||
1571 | { ID2P(LANG_RECORDING_MENU) , fm_recording_screen }, | 1573 | { ID2P(LANG_RECORDING_MENU) , fm_recording_screen }, |
1572 | { ID2P(LANG_RECORDING_SETTINGS) , fm_recording_settings }, | ||
1573 | #endif | 1574 | #endif |
1575 | #ifdef FM_RECORDING_SETTINGS | ||
1576 | { ID2P(LANG_RECORDING_SETTINGS) , fm_recording_settings }, | ||
1574 | #endif | 1577 | #endif |
1575 | { ID2P(LANG_FM_SCAN_PRESETS) , scan_presets }, | 1578 | { ID2P(LANG_FM_SCAN_PRESETS) , scan_presets }, |
1576 | }; | 1579 | }; |