diff options
Diffstat (limited to 'apps/recorder/recording.c')
-rw-r--r-- | apps/recorder/recording.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 61103a8209..12090ee412 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -751,6 +751,10 @@ bool recording_screen(bool no_source) | |||
751 | bool been_in_usb_mode = false; | 751 | bool been_in_usb_mode = false; |
752 | int last_audio_stat = -1; | 752 | int last_audio_stat = -1; |
753 | int audio_stat; | 753 | int audio_stat; |
754 | #if CONFIG_CODEC == SWCODEC | ||
755 | int warning_counter = 0; | ||
756 | #define WARNING_PERIOD 7 | ||
757 | #endif | ||
754 | #ifdef HAVE_FMRADIO_IN | 758 | #ifdef HAVE_FMRADIO_IN |
755 | /* Radio is left on if: | 759 | /* Radio is left on if: |
756 | * 1) Is was on at the start and the initial source is FM Radio | 760 | * 1) Is was on at the start and the initial source is FM Radio |
@@ -1292,7 +1296,7 @@ bool recording_screen(bool no_source) | |||
1292 | default: | 1296 | default: |
1293 | default_event_handler(button); | 1297 | default_event_handler(button); |
1294 | break; | 1298 | break; |
1295 | } | 1299 | } /* end switch */ |
1296 | 1300 | ||
1297 | #ifdef HAVE_AGC | 1301 | #ifdef HAVE_AGC |
1298 | peak_read = !peak_read; | 1302 | peak_read = !peak_read; |
@@ -1328,6 +1332,20 @@ bool recording_screen(bool no_source) | |||
1328 | for(i = 0; i < screen_update; i++) | 1332 | for(i = 0; i < screen_update; i++) |
1329 | screens[i].clear_display(); | 1333 | screens[i].clear_display(); |
1330 | 1334 | ||
1335 | #if CONFIG_CODEC == SWCODEC | ||
1336 | if ((audio_stat & AUDIO_STATUS_WARNING) | ||
1337 | && (warning_counter++ % WARNING_PERIOD) < WARNING_PERIOD/2) | ||
1338 | { | ||
1339 | /* Switch back and forth displaying warning on first available | ||
1340 | line to ensure visibility - the motion should also help | ||
1341 | draw attention */ | ||
1342 | /* Don't use language string unless agreed upon to make this | ||
1343 | method permanent - could do something in the statusbar */ | ||
1344 | snprintf(buf, sizeof(buf), "Warning: %08X", | ||
1345 | pcm_rec_get_warnings()); | ||
1346 | } | ||
1347 | else | ||
1348 | #endif /* CONFIG_CODEC == SWCODEC */ | ||
1331 | if ((global_settings.rec_sizesplit) && (global_settings.rec_split_method)) | 1349 | if ((global_settings.rec_sizesplit) && (global_settings.rec_split_method)) |
1332 | { | 1350 | { |
1333 | dmb = dsize/1024/1024; | 1351 | dmb = dsize/1024/1024; |
@@ -1381,18 +1399,17 @@ bool recording_screen(bool no_source) | |||
1381 | { | 1399 | { |
1382 | if (filename_offset[i] > 0) | 1400 | if (filename_offset[i] > 0) |
1383 | { | 1401 | { |
1402 | *filename = '\0'; | ||
1384 | if (audio_stat & AUDIO_STATUS_RECORD) | 1403 | if (audio_stat & AUDIO_STATUS_RECORD) |
1385 | { | 1404 | { |
1386 | strncpy(filename, path_buffer + | 1405 | strncpy(filename, path_buffer + |
1387 | strlen(path_buffer) - 12, 13); | 1406 | strlen(path_buffer) - 12, 13); |
1388 | filename[12]='\0'; | 1407 | filename[12]='\0'; |
1389 | } | 1408 | } |
1390 | else | ||
1391 | strcpy(filename, ""); | ||
1392 | 1409 | ||
1393 | snprintf(buf, sizeof(buf), "%s %s", | 1410 | snprintf(buf, sizeof(buf), "%s %s", |
1394 | str(LANG_SYSFONT_RECORDING_FILENAME), filename); | 1411 | str(LANG_SYSFONT_RECORDING_FILENAME), filename); |
1395 | screens[i].puts(0, 2, buf); | 1412 | screens[i].puts(0, 2, buf); |
1396 | } | 1413 | } |
1397 | } | 1414 | } |
1398 | 1415 | ||