summaryrefslogtreecommitdiff
path: root/apps/gui/statusbar.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/statusbar.c')
-rw-r--r--apps/gui/statusbar.c49
1 files changed, 1 insertions, 48 deletions
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c
index 90d04a7930..0c8f54f749 100644
--- a/apps/gui/statusbar.c
+++ b/apps/gui/statusbar.c
@@ -27,9 +27,7 @@
27#include "sound.h" 27#include "sound.h"
28#include "settings.h" 28#include "settings.h"
29#include "viewport.h" 29#include "viewport.h"
30#if CONFIG_CODEC == SWCODEC
31#include "metadata.h" 30#include "metadata.h"
32#endif
33#include "icons.h" 31#include "icons.h"
34#include "powermgmt.h" 32#include "powermgmt.h"
35#include "usb.h" 33#include "usb.h"
@@ -602,7 +600,6 @@ static void gui_statusbar_time(struct screen * display, struct tm *time)
602#endif 600#endif
603 601
604#ifdef HAVE_RECORDING 602#ifdef HAVE_RECORDING
605#if CONFIG_CODEC == SWCODEC
606/** 603/**
607 * Write a number to the display using bitmaps and return new position 604 * Write a number to the display using bitmaps and return new position
608 */ 605 */
@@ -650,7 +647,7 @@ static void gui_statusbar_write_format_info(struct screen * display)
650 xpos += BM_GLYPH_WIDTH; 647 xpos += BM_GLYPH_WIDTH;
651 } 648 }
652 } 649 }
653 650
654 651
655 /* Show bitmap - clipping right edge if needed */ 652 /* Show bitmap - clipping right edge if needed */
656 display->mono_bitmap_part(bm, 0, 0, STATUSBAR_ENCODER_WIDTH, 653 display->mono_bitmap_part(bm, 0, 0, STATUSBAR_ENCODER_WIDTH,
@@ -695,58 +692,14 @@ static void gui_statusbar_write_samplerate_info(struct screen * display)
695 STATUSBAR_Y_POS, BM_GLYPH_WIDTH, 692 STATUSBAR_Y_POS, BM_GLYPH_WIDTH,
696 STATUSBAR_HEIGHT); 693 STATUSBAR_HEIGHT);
697} 694}
698#endif /* CONFIG_CODEC == SWCODEC */
699 695
700static void gui_statusbar_icon_recording_info(struct screen * display) 696static void gui_statusbar_icon_recording_info(struct screen * display)
701{ 697{
702#if CONFIG_CODEC != SWCODEC
703 char buffer[3];
704 const char *p = buffer;
705 int width, height;
706 display->setfont(FONT_SYSFIXED);
707#endif /* CONFIG_CODEC != SWCODEC */
708
709 /* Display Codec info in statusbar */ 698 /* Display Codec info in statusbar */
710#if CONFIG_CODEC == SWCODEC
711 gui_statusbar_write_format_info(display); 699 gui_statusbar_write_format_info(display);
712#else /* !SWCODEC */
713 display->mono_bitmap(bitmap_icons_5x8[Icon_q],
714 STATUSBAR_ENCODER_X_POS + 8, STATUSBAR_Y_POS,
715 5, STATUSBAR_HEIGHT);
716
717 snprintf(buffer, sizeof(buffer), "%d", global_settings.rec_quality);
718 display->getstringsize(buffer, &width, &height);
719 if (height <= STATUSBAR_HEIGHT)
720 display->putsxy(STATUSBAR_ENCODER_X_POS + 13, STATUSBAR_Y_POS, buffer);
721#endif /* CONFIG_CODEC == SWCODEC */
722 700
723 /* Display Samplerate info in statusbar */ 701 /* Display Samplerate info in statusbar */
724#if CONFIG_CODEC == SWCODEC
725 /* SWCODEC targets use bitmaps for glyphs */
726 gui_statusbar_write_samplerate_info(display); 702 gui_statusbar_write_samplerate_info(display);
727#else /* !SWCODEC */
728 /* hwcodec targets have sysfont characters */
729#ifdef HAVE_SPDIF_REC
730 if (global_settings.rec_source == AUDIO_SRC_SPDIF)
731 {
732 /* Can't measure S/PDIF sample rate on Archos/Sim yet */
733 p = "--";
734 }
735 else
736#endif /* HAVE_SPDIF_IN */
737 {
738 static const char * const freq_strings[] =
739 {"44", "48", "32", "22", "24", "16"};
740 p = freq_strings[global_settings.rec_frequency];
741 }
742
743 display->getstringsize(p, &width, &height);
744
745 if (height <= STATUSBAR_HEIGHT)
746 display->putsxy(STATUSBAR_RECFREQ_X_POS, STATUSBAR_Y_POS, p);
747
748 display->setfont(FONT_UI);
749#endif /* CONFIG_CODEC == SWCODEC */
750 703
751 /* Display Channel status in status bar */ 704 /* Display Channel status in status bar */
752 if(global_settings.rec_channels) 705 if(global_settings.rec_channels)