From 183499a2d43ebcec9a522bbcbde506f0b3c5e01d Mon Sep 17 00:00:00 2001 From: Martin Scarratt Date: Tue, 26 Sep 2006 11:56:59 +0000 Subject: 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 --- apps/gui/statusbar.c | 36 +++++++++++++----------------------- apps/recorder/icons.c | 7 +++++-- apps/recorder/icons.h | 3 +++ 3 files changed, 21 insertions(+), 25 deletions(-) (limited to 'apps') diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index b5913af9be..a8b8c5061b 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 711df633f4..02f14bd806 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 b4310aa90a..826f18b123 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 }; -- cgit v1.2.3