summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2003-02-14 02:48:12 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2003-02-14 02:48:12 +0000
commit1fcd31d3ff0e8f2acf2351252b836239cc78a670 (patch)
tree7a710721c05da96f3342d699376adaaf06985f81 /apps
parentebe0752469021dfb09f2fb2b0752e192833e9f23 (diff)
downloadrockbox-1fcd31d3ff0e8f2acf2351252b836239cc78a670.tar.gz
rockbox-1fcd31d3ff0e8f2acf2351252b836239cc78a670.zip
Fixed the 3-hour time display bug, plus some cosmetic changes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3253 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/lang/english.lang10
-rw-r--r--apps/recorder/recording.c31
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
1366desc: ID3 info is missing 1366desc: ID3 info is missing
1367eng: "<no info>" 1367eng: "<no info>"
1368new: 1368new:
1369
1370id: LANG_RECORDING_TIME
1371desc: Display of recorded time
1372eng: "Time:"
1373new:
1374
1375id: LANG_RECORDING_SIZE
1376desc: Display of recorded file size
1377eng: "Size:"
1378new:
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
128unsigned 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
138static char *create_filename(void) 128static 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 */