1
0
Fork 0
forked from len0rd/rockbox

Added some debugging info to chase the 3-hour time display bug

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3227 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2003-02-08 02:59:47 +00:00
parent 6ceb79622f
commit c43a307011
2 changed files with 13 additions and 12 deletions

View file

@ -53,6 +53,9 @@ extern int mp3buf_write;
extern int mp3buf_read;
extern bool recording;
extern unsigned long record_start_frame; /* Frame number where
recording started */
#define SOURCE_MIC 0
#define SOURCE_LINE 1
#define SOURCE_SPDIF 2
@ -122,8 +125,6 @@ void adjust_cursor(void)
}
}
#define BLINK_INTERVAL 2
unsigned int frame_times[] =
{
2612, /* 44.1kHz */
@ -161,10 +162,10 @@ bool recording_screen(void)
int w, h;
int update_countdown = 1;
bool have_recorded = false;
bool blink_toggle = false;
unsigned long seconds;
unsigned long last_seconds = 0;
int hours, minutes;
unsigned long val;
cursor = 0;
mpeg_init_recording();
@ -360,12 +361,12 @@ bool recording_screen(void)
lcd_clear_display();
if(mpeg_status() & MPEG_STATUS_RECORD)
{
blink_toggle = blink_toggle?false:true;
if(blink_toggle)
lcd_puts(0, 0, "Recording");
}
/* DEBUG: Read the current frame */
mas_readmem(MAS_BANK_D0, 0xfd0, &val, 1);
snprintf(buf, 32, "%05x:%05x:%05x",
mpeg_num_recorded_frames(), val, record_start_frame);
lcd_puts(0, 0, buf);
hours = seconds / 3600;
minutes = (seconds - (hours * 3600)) / 60;

View file

@ -482,8 +482,8 @@ static int lowest_watermark_level; /* Debug value to observe the buffer
#ifdef HAVE_MAS3587F
static bool is_recording; /* We are recording */
static bool stop_pending;
static unsigned long record_start_frame; /* Frame number where
recording started */
unsigned long record_start_frame; /* Frame number where
recording started */
static bool saving; /* We are saving the buffer to disk */
#endif
@ -2187,7 +2187,7 @@ unsigned long mpeg_num_recorded_frames(void)
{
/* Read the current frame */
mas_readmem(MAS_BANK_D0, 0xfd0, &val, 1);
return val - record_start_frame;
}
else