summaryrefslogtreecommitdiff
path: root/apps/recorder
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-04-22 23:51:06 +0000
committerJens Arnold <amiconn@rockbox.org>2006-04-22 23:51:06 +0000
commita8e3313b0d78ab375e8573c388e2662122c5c60e (patch)
tree90644840674d72cb439e69dc793f50cd4960b6df /apps/recorder
parentb76bb60219c08d8321ffe6260072b8291499e79a (diff)
Recording screen: Make the peakmeter single height again on archos, bringing back the sample frequency line. The recording screen still needs to be *properly* adapted to the multi-screen API, including the peakmeter.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9770 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder')
-rw-r--r--apps/recorder/recording.c49
1 files changed, 30 insertions, 19 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index 5fa0f398fe..172689372f 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -115,7 +115,9 @@
#define REC_RC_NEXT BUTTON_RC_FF
#define REC_RC_PREV BUTTON_RC_REW
#define REC_RC_SETTINGS BUTTON_RC_MODE
-#endif
+#endif
+
+#define PM_HEIGHT ((LCD_HEIGHT >= 72) ? 2 : 1)
bool f2_rec_screen(void);
bool f3_rec_screen(void);
@@ -645,7 +647,7 @@ bool recording_screen(void)
#endif /* CONFIG_LED */
/* Wait for a button a while (HZ/10) drawing the peak meter */
- button = peak_meter_draw_get_btn(0, 8 + h*2, h*2);
+ button = peak_meter_draw_get_btn(0, 8 + h*2, h * PM_HEIGHT);
if (last_audio_stat != audio_stat)
{
@@ -1069,12 +1071,13 @@ bool recording_screen(void)
if (global_settings.invert_cursor && (pos++ == cursor))
{
FOR_NB_SCREENS(i)
- screens[i].puts_style_offset(0, 4, buf, STYLE_INVERT,0);
+ screens[i].puts_style_offset(0, 2+PM_HEIGHT, buf,
+ STYLE_INVERT,0);
}
else
{
FOR_NB_SCREENS(i)
- screens[i].puts(0, 4, buf);
+ screens[i].puts(0, 2+PM_HEIGHT, buf);
}
if(global_settings.rec_source == SOURCE_MIC)
@@ -1116,12 +1119,13 @@ bool recording_screen(void)
if(global_settings.invert_cursor && ((1==cursor)||(2==cursor)))
{
FOR_NB_SCREENS(i)
- screens[i].puts_style_offset(0, 5, buf, STYLE_INVERT,0);
+ screens[i].puts_style_offset(0, 3+PM_HEIGHT, buf,
+ STYLE_INVERT,0);
}
else
{
FOR_NB_SCREENS(i)
- screens[i].puts(0, 5, buf);
+ screens[i].puts(0, 3+PM_HEIGHT, buf);
}
}
else if(global_settings.rec_source == SOURCE_LINE)
@@ -1167,12 +1171,13 @@ bool recording_screen(void)
if(global_settings.invert_cursor && ((1==cursor)||(2==cursor)))
{
FOR_NB_SCREENS(i)
- screens[i].puts_style_offset(0, 5, buf, STYLE_INVERT,0);
+ screens[i].puts_style_offset(0, 3+PM_HEIGHT, buf,
+ STYLE_INVERT,0);
}
else
{
FOR_NB_SCREENS(i)
- screens[i].puts(0, 5, buf);
+ screens[i].puts(0, 3+PM_HEIGHT, buf);
}
#ifdef HAVE_UDA1380
@@ -1204,12 +1209,13 @@ bool recording_screen(void)
if(global_settings.invert_cursor && ((1==cursor)||(3==cursor)))
{
FOR_NB_SCREENS(i)
- screens[i].puts_style_offset(0, 6, buf, STYLE_INVERT,0);
+ screens[i].puts_style_offset(0, 4+PM_HEIGHT, buf,
+ STYLE_INVERT,0);
}
else
{
FOR_NB_SCREENS(i)
- screens[i].puts(0, 6, buf);
+ screens[i].puts(0, 4+PM_HEIGHT, buf);
}
}
@@ -1218,25 +1224,30 @@ bool recording_screen(void)
{
case 1:
FOR_NB_SCREENS(i)
- screen_put_cursorxy(&screens[i], 0, 5, true);
+ screen_put_cursorxy(&screens[i], 0,
+ 3+PM_HEIGHT, true);
if(global_settings.rec_source != SOURCE_MIC)
{
FOR_NB_SCREENS(i)
- screen_put_cursorxy(&screens[i], 0, 6, true);
- }
+ screen_put_cursorxy(&screens[i], 0,
+ 4+PM_HEIGHT, true);
+ }
break;
case 2:
FOR_NB_SCREENS(i)
- screen_put_cursorxy(&screens[i], 0, 5, true);
+ screen_put_cursorxy(&screens[i], 0,
+ 3+PM_HEIGHT, true);
break;
case 3:
FOR_NB_SCREENS(i)
- screen_put_cursorxy(&screens[i], 0, 6, true);
+ screen_put_cursorxy(&screens[i], 0,
+ 4+PM_HEIGHT, true);
break;
default:
FOR_NB_SCREENS(i)
- screen_put_cursorxy(&screens[i], 0, 4, true);
+ screen_put_cursorxy(&screens[i], 0,
+ 2+PM_HEIGHT, true);
}
}
@@ -1245,14 +1256,14 @@ bool recording_screen(void)
global_settings.rec_channels?
str(LANG_CHANNEL_MONO):str(LANG_CHANNEL_STEREO));
- /* Main screen only for this info */
- lcd_puts(0, 8, buf);
+ FOR_NB_SCREENS(i)
+ screens[i].puts(0, 5+PM_HEIGHT, buf);
gui_syncstatusbar_draw(&statusbars, true);
FOR_NB_SCREENS(i)
{
- peak_meter_screen(&screens[i], 0, 8 + h*2, h*2);
+ peak_meter_screen(&screens[i], 0, 8 + h*2, h*PM_HEIGHT);
screens[i].update();
}