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:
parent
6ceb79622f
commit
c43a307011
2 changed files with 13 additions and 12 deletions
|
@ -53,6 +53,9 @@ extern int mp3buf_write;
|
||||||
extern int mp3buf_read;
|
extern int mp3buf_read;
|
||||||
extern bool recording;
|
extern bool recording;
|
||||||
|
|
||||||
|
extern unsigned long record_start_frame; /* Frame number where
|
||||||
|
recording started */
|
||||||
|
|
||||||
#define SOURCE_MIC 0
|
#define SOURCE_MIC 0
|
||||||
#define SOURCE_LINE 1
|
#define SOURCE_LINE 1
|
||||||
#define SOURCE_SPDIF 2
|
#define SOURCE_SPDIF 2
|
||||||
|
@ -122,8 +125,6 @@ void adjust_cursor(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define BLINK_INTERVAL 2
|
|
||||||
|
|
||||||
unsigned int frame_times[] =
|
unsigned int frame_times[] =
|
||||||
{
|
{
|
||||||
2612, /* 44.1kHz */
|
2612, /* 44.1kHz */
|
||||||
|
@ -161,10 +162,10 @@ bool recording_screen(void)
|
||||||
int w, h;
|
int w, h;
|
||||||
int update_countdown = 1;
|
int update_countdown = 1;
|
||||||
bool have_recorded = false;
|
bool have_recorded = false;
|
||||||
bool blink_toggle = false;
|
|
||||||
unsigned long seconds;
|
unsigned long seconds;
|
||||||
unsigned long last_seconds = 0;
|
unsigned long last_seconds = 0;
|
||||||
int hours, minutes;
|
int hours, minutes;
|
||||||
|
unsigned long val;
|
||||||
|
|
||||||
cursor = 0;
|
cursor = 0;
|
||||||
mpeg_init_recording();
|
mpeg_init_recording();
|
||||||
|
@ -360,12 +361,12 @@ bool recording_screen(void)
|
||||||
|
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
|
|
||||||
if(mpeg_status() & MPEG_STATUS_RECORD)
|
/* DEBUG: Read the current frame */
|
||||||
{
|
mas_readmem(MAS_BANK_D0, 0xfd0, &val, 1);
|
||||||
blink_toggle = blink_toggle?false:true;
|
|
||||||
if(blink_toggle)
|
snprintf(buf, 32, "%05x:%05x:%05x",
|
||||||
lcd_puts(0, 0, "Recording");
|
mpeg_num_recorded_frames(), val, record_start_frame);
|
||||||
}
|
lcd_puts(0, 0, buf);
|
||||||
|
|
||||||
hours = seconds / 3600;
|
hours = seconds / 3600;
|
||||||
minutes = (seconds - (hours * 3600)) / 60;
|
minutes = (seconds - (hours * 3600)) / 60;
|
||||||
|
|
|
@ -482,8 +482,8 @@ static int lowest_watermark_level; /* Debug value to observe the buffer
|
||||||
#ifdef HAVE_MAS3587F
|
#ifdef HAVE_MAS3587F
|
||||||
static bool is_recording; /* We are recording */
|
static bool is_recording; /* We are recording */
|
||||||
static bool stop_pending;
|
static bool stop_pending;
|
||||||
static unsigned long record_start_frame; /* Frame number where
|
unsigned long record_start_frame; /* Frame number where
|
||||||
recording started */
|
recording started */
|
||||||
static bool saving; /* We are saving the buffer to disk */
|
static bool saving; /* We are saving the buffer to disk */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2187,7 +2187,7 @@ unsigned long mpeg_num_recorded_frames(void)
|
||||||
{
|
{
|
||||||
/* Read the current frame */
|
/* Read the current frame */
|
||||||
mas_readmem(MAS_BANK_D0, 0xfd0, &val, 1);
|
mas_readmem(MAS_BANK_D0, 0xfd0, &val, 1);
|
||||||
|
|
||||||
return val - record_start_frame;
|
return val - record_start_frame;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue