From 617b67e769661d4841b4fd1ace358b932f9c0378 Mon Sep 17 00:00:00 2001 From: Martin Scarratt Date: Sat, 2 Sep 2006 17:30:30 +0000 Subject: Display bitrate (Q value for Archos), samplerate, channels and recording format (M = MP3) in the statusbar in the recording screen. This is all new info for archos targets and I-river targets now have this info on the remote as well as the main screen git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10856 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/icons.c | 27 ++++++++++++++++++++++++++- apps/recorder/icons.h | 15 +++++++++++++++ apps/recorder/recording.c | 46 ++-------------------------------------------- 3 files changed, 43 insertions(+), 45 deletions(-) (limited to 'apps/recorder') diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c index 9fab6cf71d..fc271e890f 100644 --- a/apps/recorder/icons.c +++ b/apps/recorder/icons.c @@ -31,7 +31,9 @@ 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_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 */ }; const unsigned char bitmap_icons_6x8[][6] = @@ -75,6 +77,29 @@ const unsigned char bitmap_icons_7x8[][7] = {0x7f,0x04,0x4e,0x5f,0x44,0x38,0x7f} /* Repeat-AB playmode */ }; +const unsigned char bitmap_icons_18x8[][18] = +{ + {0x00, 0x00, 0x00, 0x00, 0x3e, 0x04, 0x08, 0x04, 0x3e, 0x00, 0x00, 0x1c, 0x2a, + 0x12, 0x00, 0x1e, 0x30, 0x10}, /* mp3 64kbps */ + {0x00, 0x00, 0x00, 0x00, 0x3e, 0x04, 0x08, 0x04, 0x3e, 0x00, 0x00, 0x04, 0x0a, + 0x3e, 0x00, 0x1c, 0x2a, 0x12}, /* mp3 96kbps */ + {0x00, 0x00, 0x3e, 0x04, 0x08, 0x04, 0x3e, 0x00, 0x00, 0x3e, 0x00, 0x32, 0x2a, + 0x24, 0x00, 0x14, 0x2a, 0x14}, /* mp3 128kbps */ + {0x00, 0x00, 0x3e, 0x04, 0x08, 0x04, 0x3e, 0x00, 0x00, 0x3e, 0x00, 0x1c, 0x2a, + 0x12, 0x00, 0x1c, 0x22, 0x1c}, /* mp3 160kbps */ + {0x00, 0x00, 0x3e, 0x04, 0x08, 0x04, 0x3e, 0x00, 0x00, 0x3e, 0x00, 0x04, 0x0a, + 0x3e, 0x00, 0x32, 0x2a, 0x24}, /* mp3 192kbps */ + {0x3e, 0x04, 0x08, 0x04, 0x3e, 0x00, 0x00, 0x32, 0x2a, 0x24, 0x00, 0x32, 0x2a, + 0x24, 0x00, 0x1e, 0x30, 0x10}, /* mp3 224kbps */ + {0x3e, 0x04, 0x08, 0x04, 0x3e, 0x00, 0x00, 0x22, 0x2a, 0x14, 0x00, 0x32, 0x2a, + 0x24, 0x00, 0x1c, 0x22, 0x1c}, /* mp3 320kbps */ + {0x00, 0x00, 0x00, 0x00, 0x1e, 0x20, 0x18, 0x20, 0x1e, 0x00, 0x1e, 0x20, 0x18, + 0x06, 0x00, 0x00, 0x00, 0x00}, /* wv */ + {0x00, 0x1e, 0x20, 0x18, 0x20, 0x1e, 0x00, 0x3c, 0x12, 0x12, 0x3c, 0x00, 0x1e, + 0x20, 0x18, 0x06, 0x00, 0x00} /* wav */ +}; + + /* Disk/MMC activity */ const unsigned char bitmap_icon_disk[12] = #ifdef HAVE_MMC diff --git a/apps/recorder/icons.h b/apps/recorder/icons.h index d29b549245..5e7f157c75 100644 --- a/apps/recorder/icons.h +++ b/apps/recorder/icons.h @@ -39,6 +39,8 @@ enum icons_5x8 { Icon_Lock_Main, Icon_Lock_Remote, + Icon_Stereo, + Icon_Mono, Icon5x8Last }; @@ -83,9 +85,22 @@ enum icons_7x8 { Icon7x8Last }; +enum icons_18x8 { + Icon_mp364, + Icon_mp396, + Icon_mp3128, + Icon_mp3160, + Icon_mp3192, + Icon_mp3224, + Icon_mp3320, + Icon_wv, + Icon_wav, + Icon18x8Last +}; extern const unsigned char bitmap_icons_5x8[Icon5x8Last][5]; extern const unsigned char bitmap_icons_6x8[Icon6x8Last][6]; extern const unsigned char bitmap_icons_7x8[Icon7x8Last][7]; +extern const unsigned char bitmap_icons_18x8[Icon18x8Last][18]; extern const unsigned char bitmap_icon_disk[]; #define STATUSBAR_X_POS 0 diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index b39a96e60f..e964db1e23 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -810,6 +810,7 @@ bool recording_screen(bool no_source) ID2P(LANG_GIGABYTE) }; + global_settings.recscreen_on = true; cursor = 0; #if (CONFIG_LED == LED_REAL) && !defined(SIMULATOR) ata_set_led_enabled(false); @@ -1353,7 +1354,6 @@ bool recording_screen(bool no_source) unsigned int dseconds, dhours, dminutes; unsigned long num_recorded_bytes, dsize, dmb; int pos = 0; - char spdif_sfreq[8]; update_countdown = 5; last_seconds = seconds; @@ -1687,53 +1687,11 @@ bool recording_screen(bool no_source) PM_HEIGHT + 2, true); } } -/* Can't measure S/PDIF sample rate on Archos yet */ -#if (CONFIG_CODEC != MAS3587F) && defined(HAVE_SPDIF_IN) && !defined(SIMULATOR) - if (global_settings.rec_source == AUDIO_SRC_SPDIF) - snprintf(spdif_sfreq, 8, "%dHz", audio_get_spdif_sample_rate()); -#else - (void)spdif_sfreq; -#endif - snprintf(buf, 32, "%s %s", -#if (CONFIG_CODEC != MAS3587F) && defined(HAVE_SPDIF_IN) && !defined(SIMULATOR) - global_settings.rec_source == AUDIO_SRC_SPDIF ? - spdif_sfreq : -#endif - freq_str[global_settings.rec_frequency], - global_settings.rec_channels ? - str(LANG_SYSFONT_CHANNEL_MONO) : - str(LANG_SYSFONT_CHANNEL_STEREO)); - - for(i = 0; i < screen_update; i++) { -#ifdef HAVE_AGC - if ((global_settings.rec_source == AUDIO_SRC_MIC) - || (global_settings.rec_source == AUDIO_SRC_LINEIN) - || (global_settings.rec_source == AUDIO_SRC_FMRADIO)) - screens[i].puts(0, filename_offset[i] + PM_HEIGHT + line[i] + 1, buf); - else -#endif - screens[i].puts(0, filename_offset[i] + PM_HEIGHT + line[i], buf); - } #ifdef HAVE_AGC hist_time++; #endif -#if CONFIG_CODEC == SWCODEC - snprintf(buf, 32, "%s", - REC_QUALITY_LABEL(global_settings.rec_quality)); - for(i = 0; i < screen_update; i++){ -#ifdef HAVE_AGC - if ((global_settings.rec_source == AUDIO_SRC_MIC) - || (global_settings.rec_source == AUDIO_SRC_LINEIN) - || (global_settings.rec_source == AUDIO_SRC_FMRADIO)) - screens[i].puts(0, filename_offset[i] + PM_HEIGHT + line[i] + 2, buf); - else -#endif - screens[i].puts(0, filename_offset[i] + PM_HEIGHT + line[i] + 1, buf); - } -#endif - for(i = 0; i < screen_update; i++) { gui_statusbar_draw(&(statusbars.statusbars[i]), true); @@ -1758,7 +1716,6 @@ bool recording_screen(bool no_source) } } /* end while(!done) */ - #if CONFIG_CODEC == SWCODEC audio_stat = pcm_rec_status(); #else @@ -1806,6 +1763,7 @@ bool recording_screen(bool no_source) peak_meter_trigger(false); peak_meter_set_trigger_listener(NULL); + global_settings.recscreen_on = false; sound_settings_apply(); FOR_NB_SCREENS(i) -- cgit v1.2.3