summaryrefslogtreecommitdiff
path: root/apps/recorder/radio.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/recorder/radio.c')
-rw-r--r--apps/recorder/radio.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c
index d74437a8c9..7a0cc6543e 100644
--- a/apps/recorder/radio.c
+++ b/apps/recorder/radio.c
@@ -386,6 +386,7 @@ bool radio_screen(void)
386 unsigned int last_seconds = 0; 386 unsigned int last_seconds = 0;
387#if CONFIG_CODEC != SWCODEC 387#if CONFIG_CODEC != SWCODEC
388 int hours, minutes; 388 int hours, minutes;
389 struct audio_recording_options rec_options;
389#endif 390#endif
390 bool keep_playing = false; 391 bool keep_playing = false;
391 bool statusbar = global_settings.statusbar; 392 bool statusbar = global_settings.statusbar;
@@ -436,12 +437,9 @@ bool radio_screen(void)
436 437
437 peak_meter_enabled = true; 438 peak_meter_enabled = true;
438 439
439 rec_set_recording_options(global_settings.rec_frequency, 440 rec_init_recording_options(&rec_options);
440 global_settings.rec_quality, 441 rec_options.rec_source = AUDIO_SRC_LINEIN;
441 AUDIO_SRC_LINEIN, 0, 442 rec_set_recording_options(&rec_options);
442 global_settings.rec_channels,
443 global_settings.rec_editable,
444 global_settings.rec_prerecord_time);
445 443
446 audio_set_recording_gain(sound_default(SOUND_LEFT_GAIN), 444 audio_set_recording_gain(sound_default(SOUND_LEFT_GAIN),
447 sound_default(SOUND_RIGHT_GAIN), AUDIO_GAIN_LINEIN); 445 sound_default(SOUND_RIGHT_GAIN), AUDIO_GAIN_LINEIN);
@@ -881,7 +879,7 @@ bool radio_screen(void)
881 } 879 }
882 else 880 else
883 { 881 {
884 if(global_settings.rec_prerecord_time) 882 if(rec_options.rec_prerecord_time)
885 { 883 {
886 snprintf(buf, 32, "%s %02d", 884 snprintf(buf, 32, "%s %02d",
887 str(LANG_RECORD_PRERECORD), seconds%60); 885 str(LANG_RECORD_PRERECORD), seconds%60);
@@ -1173,7 +1171,8 @@ bool save_preset_list(void)
1173 if(!opendir(FMPRESET_PATH)) /* Check if there is preset folder */ 1171 if(!opendir(FMPRESET_PATH)) /* Check if there is preset folder */
1174 mkdir(FMPRESET_PATH, 0); 1172 mkdir(FMPRESET_PATH, 0);
1175 1173
1176 create_numbered_filename(filepreset,FMPRESET_PATH,"preset",".fmr",2); 1174 create_numbered_filename(filepreset, FMPRESET_PATH, "preset",
1175 ".fmr", 2 IF_CNFN_NUM_(, NULL));
1177 1176
1178 while(bad_file_name) 1177 while(bad_file_name)
1179 { 1178 {
@@ -1534,12 +1533,10 @@ static bool fm_recording_settings(void)
1534#if CONFIG_CODEC != SWCODEC 1533#if CONFIG_CODEC != SWCODEC
1535 if (!ret) 1534 if (!ret)
1536 { 1535 {
1537 rec_set_recording_options(global_settings.rec_frequency, 1536 struct audio_recording_options rec_options;
1538 global_settings.rec_quality, 1537 rec_init_recording_options(&rec_options);
1539 AUDIO_SRC_LINEIN, 0, 1538 rec_options.rec_source = AUDIO_SRC_LINEIN;
1540 global_settings.rec_channels, 1539 rec_set_recording_options(&rec_options);
1541 global_settings.rec_editable,
1542 global_settings.rec_prerecord_time);
1543 } 1540 }
1544#endif 1541#endif
1545 1542