summaryrefslogtreecommitdiff
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
parent36e3081e8ca979a941434175e05c1f5db164b111 (diff)
downloadrockbox-183499a2d43ebcec9a522bbcbde506f0b3c5e01d.tar.gz
rockbox-183499a2d43ebcec9a522bbcbde506f0b3c5e01d.zip
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
-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 b5913af9be..a8b8c5061b 100644
--- a/apps/gui/statusbar.c
+++ b/apps/gui/statusbar.c
@@ -77,7 +77,7 @@
77 STATUSBAR_PLUG_WIDTH + \ 77 STATUSBAR_PLUG_WIDTH + \
78 STATUSBAR_VOLUME_WIDTH + \ 78 STATUSBAR_VOLUME_WIDTH + \
79 STATUSBAR_PLAY_STATE_WIDTH + \ 79 STATUSBAR_PLAY_STATE_WIDTH + \
80 4*ICONS_SPACING - 1 80 3*ICONS_SPACING
81#define STATUSBAR_RECFREQ_WIDTH 12 81#define STATUSBAR_RECFREQ_WIDTH 12
82#define STATUSBAR_RECCHANNELS_X_POS STATUSBAR_X_POS + \ 82#define STATUSBAR_RECCHANNELS_X_POS STATUSBAR_X_POS + \
83 STATUSBAR_BATTERY_WIDTH + \ 83 STATUSBAR_BATTERY_WIDTH + \
@@ -603,7 +603,7 @@ void gui_statusbar_time(struct screen * display, int hour, int minute)
603void gui_statusbar_icon_recording_info(struct screen * display) 603void gui_statusbar_icon_recording_info(struct screen * display)
604{ 604{
605#if (CONFIG_CODEC != SWCODEC) || (defined(SIMULATOR) && defined(HAVE_SPDIF_IN)) 605#if (CONFIG_CODEC != SWCODEC) || (defined(SIMULATOR) && defined(HAVE_SPDIF_IN))
606 char buffer[4]; 606 char buffer[3];
607#endif 607#endif
608#if CONFIG_CODEC != SWCODEC 608#if CONFIG_CODEC != SWCODEC
609 int width, height; 609 int width, height;
@@ -622,18 +622,6 @@ void gui_statusbar_icon_recording_info(struct screen * display)
622 "88", 622 "88",
623 "96" 623 "96"
624 }; 624 };
625 static char* const bit_rate[9] =
626 {
627 "Mq0",
628 "Mq1",
629 "Mq2",
630 "Mq3",
631 "Mq4",
632 "Mq5",
633 "Mq6",
634 "Mq7",
635 "WAV"
636 };
637 625
638 display->setfont(FONT_SYSFIXED); 626 display->setfont(FONT_SYSFIXED);
639#endif 627#endif
@@ -646,13 +634,15 @@ void gui_statusbar_icon_recording_info(struct screen * display)
646 STATUSBAR_ENCODER_X_POS, STATUSBAR_Y_POS, 634 STATUSBAR_ENCODER_X_POS, STATUSBAR_Y_POS,
647 STATUSBAR_ENCODER_WIDTH, STATUSBAR_HEIGHT); 635 STATUSBAR_ENCODER_WIDTH, STATUSBAR_HEIGHT);
648#else 636#else
649 snprintf(buffer, sizeof(buffer), "%s", 637
650 bit_rate[global_settings.rec_quality]); 638 display->mono_bitmap(bitmap_icons_5x8[Icon_q],
639 STATUSBAR_ENCODER_X_POS + 8, STATUSBAR_Y_POS,
640 5, STATUSBAR_HEIGHT);
641
642 snprintf(buffer, sizeof(buffer), "%d", global_settings.rec_quality);
651 display->getstringsize(buffer, &width, &height); 643 display->getstringsize(buffer, &width, &height);
652 if (height <= STATUSBAR_HEIGHT) 644 if (height <= STATUSBAR_HEIGHT)
653 { 645 display->putsxy(STATUSBAR_ENCODER_X_POS + 13, STATUSBAR_Y_POS, buffer);
654 display->putsxy(STATUSBAR_ENCODER_X_POS, STATUSBAR_Y_POS, buffer);
655 }
656#endif 646#endif
657 647
658 /* Display Samplerate info in statusbar */ 648 /* Display Samplerate info in statusbar */
@@ -664,9 +654,8 @@ void gui_statusbar_icon_recording_info(struct screen * display)
664 STATUSBAR_RECFREQ_X_POS, STATUSBAR_Y_POS, 654 STATUSBAR_RECFREQ_X_POS, STATUSBAR_Y_POS,
665 STATUSBAR_RECFREQ_WIDTH, STATUSBAR_HEIGHT); 655 STATUSBAR_RECFREQ_WIDTH, STATUSBAR_HEIGHT);
666#else 656#else
667 /* Can't measure S/PDIF sample rate on Archos/Sim yet so 657 /* Can't measure S/PDIF sample rate on Archos/Sim yet */
668 just display input type */ 658 snprintf(buffer, sizeof(buffer), "--");
669 snprintf(buffer, sizeof(buffer), "Dg");
670#endif 659#endif
671 } 660 }
672 else 661 else
@@ -692,17 +681,18 @@ void gui_statusbar_icon_recording_info(struct screen * display)
692 display->mono_bitmap(bitmap_icons_12x8[freq], 681 display->mono_bitmap(bitmap_icons_12x8[freq],
693 STATUSBAR_RECFREQ_X_POS, STATUSBAR_Y_POS, 682 STATUSBAR_RECFREQ_X_POS, STATUSBAR_Y_POS,
694 STATUSBAR_RECFREQ_WIDTH, STATUSBAR_HEIGHT); 683 STATUSBAR_RECFREQ_WIDTH, STATUSBAR_HEIGHT);
684 }
695#else 685#else
696 /* hwcodec targets have sysfont characters */ 686 /* hwcodec targets have sysfont characters */
697 snprintf(buffer, sizeof(buffer), "%s", sample_rate[freq]); 687 snprintf(buffer, sizeof(buffer), "%s", sample_rate[freq]);
698 display->getstringsize(buffer, &width, &height); 688 display->getstringsize(buffer, &width, &height);
689 }
699 690
700 if (height <= STATUSBAR_HEIGHT) 691 if (height <= STATUSBAR_HEIGHT)
701 display->putsxy(STATUSBAR_RECFREQ_X_POS, STATUSBAR_Y_POS, buffer); 692 display->putsxy(STATUSBAR_RECFREQ_X_POS, STATUSBAR_Y_POS, buffer);
702 693
703 display->setfont(FONT_UI); 694 display->setfont(FONT_UI);
704#endif 695#endif
705 }
706 /* Display Channel status in status bar */ 696 /* Display Channel status in status bar */
707 if(global_settings.rec_channels) 697 if(global_settings.rec_channels)
708 { 698 {
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] =
32{ 32{
33 [Icon_Lock_Main] ={0x78,0x7f,0x49,0x7f,0x78}, /* Lock Main */ 33 [Icon_Lock_Main] ={0x78,0x7f,0x49,0x7f,0x78}, /* Lock Main */
34 [Icon_Lock_Remote]={0x78,0x7f,0x49,0x7f,0x78}, /* Lock Remote */ 34 [Icon_Lock_Remote]={0x78,0x7f,0x49,0x7f,0x78}, /* Lock Remote */
35 [Icon_Stereo]={0x1c, 0x22, 0x1c, 0x22, 0x1c}, /* Stereo recording */ 35 [Icon_Stereo]={0x7f, 0x1c, 0x00, 0x1c, 0x7f}, /* Stereo recording */
36 [Icon_Mono]={0x00, 0x1c, 0x22, 0x1c, 0x00} /* Mono recording */ 36 [Icon_Mono]={0x00, 0x1c, 0x7f, 0x00, 0x00}, /* Mono recording */
37#if CONFIG_CODEC != SWCODEC
38 [Icon_q]={0x1e, 0x21, 0x31, 0x21, 0x5e} /* Q icon */
39#endif
37}; 40};
38 41
39const unsigned char bitmap_icons_6x8[][6] = 42const 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 {
41 Icon_Lock_Remote, 41 Icon_Lock_Remote,
42 Icon_Stereo, 42 Icon_Stereo,
43 Icon_Mono, 43 Icon_Mono,
44#if CONFIG_CODEC != SWCODEC
45 Icon_q,
46#endif
44 Icon5x8Last 47 Icon5x8Last
45}; 48};
46 49