diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/lang/english.lang | 10 | ||||
-rw-r--r-- | apps/recorder/recording.c | 31 |
2 files changed, 18 insertions, 23 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 7ab205f9f7..c1541cf947 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang | |||
@@ -1366,3 +1366,13 @@ id: LANG_ID3_NO_INFO | |||
1366 | desc: ID3 info is missing | 1366 | desc: ID3 info is missing |
1367 | eng: "<no info>" | 1367 | eng: "<no info>" |
1368 | new: | 1368 | new: |
1369 | |||
1370 | id: LANG_RECORDING_TIME | ||
1371 | desc: Display of recorded time | ||
1372 | eng: "Time:" | ||
1373 | new: | ||
1374 | |||
1375 | id: LANG_RECORDING_SIZE | ||
1376 | desc: Display of recorded file size | ||
1377 | eng: "Size:" | ||
1378 | new: | ||
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index e301cd322e..0e78b2c66b 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -125,16 +125,6 @@ void adjust_cursor(void) | |||
125 | } | 125 | } |
126 | } | 126 | } |
127 | 127 | ||
128 | unsigned int frame_times[] = | ||
129 | { | ||
130 | 2612, /* 44.1kHz */ | ||
131 | 2400, /* 48kHz */ | ||
132 | 3600, /* 32kHz */ | ||
133 | 2612, /* 22.05kHz */ | ||
134 | 2400, /* 24kHz */ | ||
135 | 3200 /* 16kHz */ | ||
136 | }; | ||
137 | |||
138 | static char *create_filename(void) | 128 | static char *create_filename(void) |
139 | { | 129 | { |
140 | static char fname[32]; | 130 | static char fname[32]; |
@@ -165,7 +155,6 @@ bool recording_screen(void) | |||
165 | unsigned long seconds; | 155 | unsigned long seconds; |
166 | unsigned long last_seconds = 0; | 156 | unsigned long last_seconds = 0; |
167 | int hours, minutes; | 157 | int hours, minutes; |
168 | unsigned long val; | ||
169 | 158 | ||
170 | cursor = 0; | 159 | cursor = 0; |
171 | mpeg_init_recording(); | 160 | mpeg_init_recording(); |
@@ -349,9 +338,7 @@ bool recording_screen(void) | |||
349 | { | 338 | { |
350 | timeout = current_tick + HZ/10; | 339 | timeout = current_tick + HZ/10; |
351 | 340 | ||
352 | seconds = mpeg_num_recorded_frames(); | 341 | seconds = mpeg_recorded_time() / HZ; |
353 | seconds *= frame_times[global_settings.rec_frequency]; | ||
354 | seconds /= 100000; | ||
355 | 342 | ||
356 | update_countdown--; | 343 | update_countdown--; |
357 | if(update_countdown == 0 || seconds > last_seconds) | 344 | if(update_countdown == 0 || seconds > last_seconds) |
@@ -361,19 +348,17 @@ bool recording_screen(void) | |||
361 | 348 | ||
362 | lcd_clear_display(); | 349 | lcd_clear_display(); |
363 | 350 | ||
364 | /* DEBUG: Read the current frame */ | ||
365 | mas_readmem(MAS_BANK_D0, 0xfd0, &val, 1); | ||
366 | |||
367 | snprintf(buf, 32, "%05x:%05x:%05x", | ||
368 | mpeg_num_recorded_frames(), val, record_start_frame); | ||
369 | lcd_puts(0, 0, buf); | ||
370 | |||
371 | hours = seconds / 3600; | 351 | hours = seconds / 3600; |
372 | minutes = (seconds - (hours * 3600)) / 60; | 352 | minutes = (seconds - (hours * 3600)) / 60; |
373 | snprintf(buf, 32, "%02d:%02d:%02d %s", | 353 | snprintf(buf, 32, "%s %02d:%02d:%02d", |
374 | hours, minutes, seconds%60, | 354 | str(LANG_RECORDING_TIME), |
355 | hours, minutes, seconds%60); | ||
356 | lcd_puts(0, 0, buf); | ||
357 | |||
358 | snprintf(buf, 32, "%s %s", str(LANG_RECORDING_SIZE), | ||
375 | num2max5(mpeg_num_recorded_bytes(), buf2)); | 359 | num2max5(mpeg_num_recorded_bytes(), buf2)); |
376 | lcd_puts(0, 1, buf); | 360 | lcd_puts(0, 1, buf); |
361 | |||
377 | peak_meter_draw(0, 8 + h*2, LCD_WIDTH, h); | 362 | peak_meter_draw(0, 8 + h*2, LCD_WIDTH, h); |
378 | 363 | ||
379 | /* Show mic gain if input source is Mic */ | 364 | /* Show mic gain if input source is Mic */ |