summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMartin Scarratt <mmmm@rockbox.org>2006-09-26 11:56:59 +0000
committerMartin Scarratt <mmmm@rockbox.org>2006-09-26 11:56:59 +0000
commit183499a2d43ebcec9a522bbcbde506f0b3c5e01d (patch)
treeb6c7a976c5785a6df79b3e9fc8293dda0ae87c10 /apps
parent36e3081e8ca979a941434175e05c1f5db164b111 (diff)
downloadrockbox-183499a2d43ebcec9a522bbcbde506f0b3c5e01d.zip
rockbox-183499a2d43ebcec9a522bbcbde506f0b3c5e01d.tar.gz
rockbox-183499a2d43ebcec9a522bbcbde506f0b3c5e01d.tar.bz2
rockbox-183499a2d43ebcec9a522bbcbde506f0b3c5e01d.tar.xz
Recording screen statusbar: Improved channel icon by Paul Louden and improved Q value display for Hardware codec targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11062 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/statusbar.c36
-rw-r--r--apps/recorder/icons.c7
-rw-r--r--apps/recorder/icons.h3
3 files changed, 21 insertions, 25 deletions
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c
index b5913af..a8b8c50 100644
--- a/apps/gui/statusbar.c
+++ b/apps/gui/statusbar.c
@@ -77,7 +77,7 @@
STATUSBAR_PLUG_WIDTH + \
STATUSBAR_VOLUME_WIDTH + \
STATUSBAR_PLAY_STATE_WIDTH + \
- 4*ICONS_SPACING - 1
+ 3*ICONS_SPACING
#define STATUSBAR_RECFREQ_WIDTH 12
#define STATUSBAR_RECCHANNELS_X_POS STATUSBAR_X_POS + \
STATUSBAR_BATTERY_WIDTH + \
@@ -603,7 +603,7 @@ void gui_statusbar_time(struct screen * display, int hour, int minute)
void gui_statusbar_icon_recording_info(struct screen * display)
{
#if (CONFIG_CODEC != SWCODEC) || (defined(SIMULATOR) && defined(HAVE_SPDIF_IN))
- char buffer[4];
+ char buffer[3];
#endif
#if CONFIG_CODEC != SWCODEC
int width, height;
@@ -622,18 +622,6 @@ void gui_statusbar_icon_recording_info(struct screen * display)
"88",
"96"
};
- static char* const bit_rate[9] =
- {
- "Mq0",
- "Mq1",
- "Mq2",
- "Mq3",
- "Mq4",
- "Mq5",
- "Mq6",
- "Mq7",
- "WAV"
- };
display->setfont(FONT_SYSFIXED);
#endif
@@ -646,13 +634,15 @@ void gui_statusbar_icon_recording_info(struct screen * display)
STATUSBAR_ENCODER_X_POS, STATUSBAR_Y_POS,
STATUSBAR_ENCODER_WIDTH, STATUSBAR_HEIGHT);
#else
- snprintf(buffer, sizeof(buffer), "%s",
- bit_rate[global_settings.rec_quality]);
+
+ display->mono_bitmap(bitmap_icons_5x8[Icon_q],
+ STATUSBAR_ENCODER_X_POS + 8, STATUSBAR_Y_POS,
+ 5, STATUSBAR_HEIGHT);
+
+ snprintf(buffer, sizeof(buffer), "%d", global_settings.rec_quality);
display->getstringsize(buffer, &width, &height);
if (height <= STATUSBAR_HEIGHT)
- {
- display->putsxy(STATUSBAR_ENCODER_X_POS, STATUSBAR_Y_POS, buffer);
- }
+ display->putsxy(STATUSBAR_ENCODER_X_POS + 13, STATUSBAR_Y_POS, buffer);
#endif
/* Display Samplerate info in statusbar */
@@ -664,9 +654,8 @@ void gui_statusbar_icon_recording_info(struct screen * display)
STATUSBAR_RECFREQ_X_POS, STATUSBAR_Y_POS,
STATUSBAR_RECFREQ_WIDTH, STATUSBAR_HEIGHT);
#else
- /* Can't measure S/PDIF sample rate on Archos/Sim yet so
- just display input type */
- snprintf(buffer, sizeof(buffer), "Dg");
+ /* Can't measure S/PDIF sample rate on Archos/Sim yet */
+ snprintf(buffer, sizeof(buffer), "--");
#endif
}
else
@@ -692,17 +681,18 @@ void gui_statusbar_icon_recording_info(struct screen * display)
display->mono_bitmap(bitmap_icons_12x8[freq],
STATUSBAR_RECFREQ_X_POS, STATUSBAR_Y_POS,
STATUSBAR_RECFREQ_WIDTH, STATUSBAR_HEIGHT);
+ }
#else
/* hwcodec targets have sysfont characters */
snprintf(buffer, sizeof(buffer), "%s", sample_rate[freq]);
display->getstringsize(buffer, &width, &height);
+ }
if (height <= STATUSBAR_HEIGHT)
display->putsxy(STATUSBAR_RECFREQ_X_POS, STATUSBAR_Y_POS, buffer);
display->setfont(FONT_UI);
#endif
- }
/* Display Channel status in status bar */
if(global_settings.rec_channels)
{
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c
index 711df63..02f14bd 100644
--- a/apps/recorder/icons.c
+++ b/apps/recorder/icons.c
@@ -32,8 +32,11 @@ const unsigned char bitmap_icons_5x8[][5] =
{
[Icon_Lock_Main] ={0x78,0x7f,0x49,0x7f,0x78}, /* Lock Main */
[Icon_Lock_Remote]={0x78,0x7f,0x49,0x7f,0x78}, /* Lock Remote */
- [Icon_Stereo]={0x1c, 0x22, 0x1c, 0x22, 0x1c}, /* Stereo recording */
- [Icon_Mono]={0x00, 0x1c, 0x22, 0x1c, 0x00} /* Mono recording */
+ [Icon_Stereo]={0x7f, 0x1c, 0x00, 0x1c, 0x7f}, /* Stereo recording */
+ [Icon_Mono]={0x00, 0x1c, 0x7f, 0x00, 0x00}, /* Mono recording */
+#if CONFIG_CODEC != SWCODEC
+ [Icon_q]={0x1e, 0x21, 0x31, 0x21, 0x5e} /* Q icon */
+#endif
};
const unsigned char bitmap_icons_6x8[][6] =
diff --git a/apps/recorder/icons.h b/apps/recorder/icons.h
index b4310aa..826f18b 100644
--- a/apps/recorder/icons.h
+++ b/apps/recorder/icons.h
@@ -41,6 +41,9 @@ enum icons_5x8 {
Icon_Lock_Remote,
Icon_Stereo,
Icon_Mono,
+#if CONFIG_CODEC != SWCODEC
+ Icon_q,
+#endif
Icon5x8Last
};