diff options
Diffstat (limited to 'apps/recorder')
-rw-r--r-- | apps/recorder/icons.c | 27 | ||||
-rw-r--r-- | apps/recorder/icons.h | 15 | ||||
-rw-r--r-- | apps/recorder/recording.c | 46 |
3 files changed, 43 insertions, 45 deletions
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 @@ | |||
31 | const unsigned char bitmap_icons_5x8[][5] = | 31 | 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 */ | ||
36 | [Icon_Mono]={0x00, 0x1c, 0x22, 0x1c, 0x00} /* Mono recording */ | ||
35 | }; | 37 | }; |
36 | 38 | ||
37 | const unsigned char bitmap_icons_6x8[][6] = | 39 | const unsigned char bitmap_icons_6x8[][6] = |
@@ -75,6 +77,29 @@ const unsigned char bitmap_icons_7x8[][7] = | |||
75 | {0x7f,0x04,0x4e,0x5f,0x44,0x38,0x7f} /* Repeat-AB playmode */ | 77 | {0x7f,0x04,0x4e,0x5f,0x44,0x38,0x7f} /* Repeat-AB playmode */ |
76 | }; | 78 | }; |
77 | 79 | ||
80 | const unsigned char bitmap_icons_18x8[][18] = | ||
81 | { | ||
82 | {0x00, 0x00, 0x00, 0x00, 0x3e, 0x04, 0x08, 0x04, 0x3e, 0x00, 0x00, 0x1c, 0x2a, | ||
83 | 0x12, 0x00, 0x1e, 0x30, 0x10}, /* mp3 64kbps */ | ||
84 | {0x00, 0x00, 0x00, 0x00, 0x3e, 0x04, 0x08, 0x04, 0x3e, 0x00, 0x00, 0x04, 0x0a, | ||
85 | 0x3e, 0x00, 0x1c, 0x2a, 0x12}, /* mp3 96kbps */ | ||
86 | {0x00, 0x00, 0x3e, 0x04, 0x08, 0x04, 0x3e, 0x00, 0x00, 0x3e, 0x00, 0x32, 0x2a, | ||
87 | 0x24, 0x00, 0x14, 0x2a, 0x14}, /* mp3 128kbps */ | ||
88 | {0x00, 0x00, 0x3e, 0x04, 0x08, 0x04, 0x3e, 0x00, 0x00, 0x3e, 0x00, 0x1c, 0x2a, | ||
89 | 0x12, 0x00, 0x1c, 0x22, 0x1c}, /* mp3 160kbps */ | ||
90 | {0x00, 0x00, 0x3e, 0x04, 0x08, 0x04, 0x3e, 0x00, 0x00, 0x3e, 0x00, 0x04, 0x0a, | ||
91 | 0x3e, 0x00, 0x32, 0x2a, 0x24}, /* mp3 192kbps */ | ||
92 | {0x3e, 0x04, 0x08, 0x04, 0x3e, 0x00, 0x00, 0x32, 0x2a, 0x24, 0x00, 0x32, 0x2a, | ||
93 | 0x24, 0x00, 0x1e, 0x30, 0x10}, /* mp3 224kbps */ | ||
94 | {0x3e, 0x04, 0x08, 0x04, 0x3e, 0x00, 0x00, 0x22, 0x2a, 0x14, 0x00, 0x32, 0x2a, | ||
95 | 0x24, 0x00, 0x1c, 0x22, 0x1c}, /* mp3 320kbps */ | ||
96 | {0x00, 0x00, 0x00, 0x00, 0x1e, 0x20, 0x18, 0x20, 0x1e, 0x00, 0x1e, 0x20, 0x18, | ||
97 | 0x06, 0x00, 0x00, 0x00, 0x00}, /* wv */ | ||
98 | {0x00, 0x1e, 0x20, 0x18, 0x20, 0x1e, 0x00, 0x3c, 0x12, 0x12, 0x3c, 0x00, 0x1e, | ||
99 | 0x20, 0x18, 0x06, 0x00, 0x00} /* wav */ | ||
100 | }; | ||
101 | |||
102 | |||
78 | /* Disk/MMC activity */ | 103 | /* Disk/MMC activity */ |
79 | const unsigned char bitmap_icon_disk[12] = | 104 | const unsigned char bitmap_icon_disk[12] = |
80 | #ifdef HAVE_MMC | 105 | #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 @@ | |||
39 | enum icons_5x8 { | 39 | enum icons_5x8 { |
40 | Icon_Lock_Main, | 40 | Icon_Lock_Main, |
41 | Icon_Lock_Remote, | 41 | Icon_Lock_Remote, |
42 | Icon_Stereo, | ||
43 | Icon_Mono, | ||
42 | Icon5x8Last | 44 | Icon5x8Last |
43 | }; | 45 | }; |
44 | 46 | ||
@@ -83,9 +85,22 @@ enum icons_7x8 { | |||
83 | Icon7x8Last | 85 | Icon7x8Last |
84 | }; | 86 | }; |
85 | 87 | ||
88 | enum icons_18x8 { | ||
89 | Icon_mp364, | ||
90 | Icon_mp396, | ||
91 | Icon_mp3128, | ||
92 | Icon_mp3160, | ||
93 | Icon_mp3192, | ||
94 | Icon_mp3224, | ||
95 | Icon_mp3320, | ||
96 | Icon_wv, | ||
97 | Icon_wav, | ||
98 | Icon18x8Last | ||
99 | }; | ||
86 | extern const unsigned char bitmap_icons_5x8[Icon5x8Last][5]; | 100 | extern const unsigned char bitmap_icons_5x8[Icon5x8Last][5]; |
87 | extern const unsigned char bitmap_icons_6x8[Icon6x8Last][6]; | 101 | extern const unsigned char bitmap_icons_6x8[Icon6x8Last][6]; |
88 | extern const unsigned char bitmap_icons_7x8[Icon7x8Last][7]; | 102 | extern const unsigned char bitmap_icons_7x8[Icon7x8Last][7]; |
103 | extern const unsigned char bitmap_icons_18x8[Icon18x8Last][18]; | ||
89 | extern const unsigned char bitmap_icon_disk[]; | 104 | extern const unsigned char bitmap_icon_disk[]; |
90 | 105 | ||
91 | #define STATUSBAR_X_POS 0 | 106 | #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) | |||
810 | ID2P(LANG_GIGABYTE) | 810 | ID2P(LANG_GIGABYTE) |
811 | }; | 811 | }; |
812 | 812 | ||
813 | global_settings.recscreen_on = true; | ||
813 | cursor = 0; | 814 | cursor = 0; |
814 | #if (CONFIG_LED == LED_REAL) && !defined(SIMULATOR) | 815 | #if (CONFIG_LED == LED_REAL) && !defined(SIMULATOR) |
815 | ata_set_led_enabled(false); | 816 | ata_set_led_enabled(false); |
@@ -1353,7 +1354,6 @@ bool recording_screen(bool no_source) | |||
1353 | unsigned int dseconds, dhours, dminutes; | 1354 | unsigned int dseconds, dhours, dminutes; |
1354 | unsigned long num_recorded_bytes, dsize, dmb; | 1355 | unsigned long num_recorded_bytes, dsize, dmb; |
1355 | int pos = 0; | 1356 | int pos = 0; |
1356 | char spdif_sfreq[8]; | ||
1357 | 1357 | ||
1358 | update_countdown = 5; | 1358 | update_countdown = 5; |
1359 | last_seconds = seconds; | 1359 | last_seconds = seconds; |
@@ -1687,53 +1687,11 @@ bool recording_screen(bool no_source) | |||
1687 | PM_HEIGHT + 2, true); | 1687 | PM_HEIGHT + 2, true); |
1688 | } | 1688 | } |
1689 | } | 1689 | } |
1690 | /* Can't measure S/PDIF sample rate on Archos yet */ | ||
1691 | #if (CONFIG_CODEC != MAS3587F) && defined(HAVE_SPDIF_IN) && !defined(SIMULATOR) | ||
1692 | if (global_settings.rec_source == AUDIO_SRC_SPDIF) | ||
1693 | snprintf(spdif_sfreq, 8, "%dHz", audio_get_spdif_sample_rate()); | ||
1694 | #else | ||
1695 | (void)spdif_sfreq; | ||
1696 | #endif | ||
1697 | snprintf(buf, 32, "%s %s", | ||
1698 | #if (CONFIG_CODEC != MAS3587F) && defined(HAVE_SPDIF_IN) && !defined(SIMULATOR) | ||
1699 | global_settings.rec_source == AUDIO_SRC_SPDIF ? | ||
1700 | spdif_sfreq : | ||
1701 | #endif | ||
1702 | freq_str[global_settings.rec_frequency], | ||
1703 | global_settings.rec_channels ? | ||
1704 | str(LANG_SYSFONT_CHANNEL_MONO) : | ||
1705 | str(LANG_SYSFONT_CHANNEL_STEREO)); | ||
1706 | |||
1707 | for(i = 0; i < screen_update; i++) { | ||
1708 | #ifdef HAVE_AGC | ||
1709 | if ((global_settings.rec_source == AUDIO_SRC_MIC) | ||
1710 | || (global_settings.rec_source == AUDIO_SRC_LINEIN) | ||
1711 | || (global_settings.rec_source == AUDIO_SRC_FMRADIO)) | ||
1712 | screens[i].puts(0, filename_offset[i] + PM_HEIGHT + line[i] + 1, buf); | ||
1713 | else | ||
1714 | #endif | ||
1715 | screens[i].puts(0, filename_offset[i] + PM_HEIGHT + line[i], buf); | ||
1716 | } | ||
1717 | 1690 | ||
1718 | #ifdef HAVE_AGC | 1691 | #ifdef HAVE_AGC |
1719 | hist_time++; | 1692 | hist_time++; |
1720 | #endif | 1693 | #endif |
1721 | 1694 | ||
1722 | #if CONFIG_CODEC == SWCODEC | ||
1723 | snprintf(buf, 32, "%s", | ||
1724 | REC_QUALITY_LABEL(global_settings.rec_quality)); | ||
1725 | for(i = 0; i < screen_update; i++){ | ||
1726 | #ifdef HAVE_AGC | ||
1727 | if ((global_settings.rec_source == AUDIO_SRC_MIC) | ||
1728 | || (global_settings.rec_source == AUDIO_SRC_LINEIN) | ||
1729 | || (global_settings.rec_source == AUDIO_SRC_FMRADIO)) | ||
1730 | screens[i].puts(0, filename_offset[i] + PM_HEIGHT + line[i] + 2, buf); | ||
1731 | else | ||
1732 | #endif | ||
1733 | screens[i].puts(0, filename_offset[i] + PM_HEIGHT + line[i] + 1, buf); | ||
1734 | } | ||
1735 | #endif | ||
1736 | |||
1737 | for(i = 0; i < screen_update; i++) | 1695 | for(i = 0; i < screen_update; i++) |
1738 | { | 1696 | { |
1739 | gui_statusbar_draw(&(statusbars.statusbars[i]), true); | 1697 | gui_statusbar_draw(&(statusbars.statusbars[i]), true); |
@@ -1758,7 +1716,6 @@ bool recording_screen(bool no_source) | |||
1758 | } | 1716 | } |
1759 | } /* end while(!done) */ | 1717 | } /* end while(!done) */ |
1760 | 1718 | ||
1761 | |||
1762 | #if CONFIG_CODEC == SWCODEC | 1719 | #if CONFIG_CODEC == SWCODEC |
1763 | audio_stat = pcm_rec_status(); | 1720 | audio_stat = pcm_rec_status(); |
1764 | #else | 1721 | #else |
@@ -1806,6 +1763,7 @@ bool recording_screen(bool no_source) | |||
1806 | peak_meter_trigger(false); | 1763 | peak_meter_trigger(false); |
1807 | peak_meter_set_trigger_listener(NULL); | 1764 | peak_meter_set_trigger_listener(NULL); |
1808 | 1765 | ||
1766 | global_settings.recscreen_on = false; | ||
1809 | sound_settings_apply(); | 1767 | sound_settings_apply(); |
1810 | 1768 | ||
1811 | FOR_NB_SCREENS(i) | 1769 | FOR_NB_SCREENS(i) |