diff options
author | Martin Scarratt <mmmm@rockbox.org> | 2006-09-26 11:56:59 +0000 |
---|---|---|
committer | Martin Scarratt <mmmm@rockbox.org> | 2006-09-26 11:56:59 +0000 |
commit | 183499a2d43ebcec9a522bbcbde506f0b3c5e01d (patch) | |
tree | b6c7a976c5785a6df79b3e9fc8293dda0ae87c10 /apps/gui/statusbar.c | |
parent | 36e3081e8ca979a941434175e05c1f5db164b111 (diff) | |
download | rockbox-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
Diffstat (limited to 'apps/gui/statusbar.c')
-rw-r--r-- | apps/gui/statusbar.c | 36 |
1 files changed, 13 insertions, 23 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) | |||
603 | void gui_statusbar_icon_recording_info(struct screen * display) | 603 | void 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 | { |