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
This commit is contained in:
Martin Scarratt 2006-09-26 11:56:59 +00:00
parent 36e3081e8c
commit 183499a2d4
3 changed files with 21 additions and 25 deletions

View file

@ -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)
{

View file

@ -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] =

View file

@ -41,6 +41,9 @@ enum icons_5x8 {
Icon_Lock_Remote,
Icon_Stereo,
Icon_Mono,
#if CONFIG_CODEC != SWCODEC
Icon_q,
#endif
Icon5x8Last
};