diff options
Diffstat (limited to 'apps/plugins/vu_meter.c')
-rw-r--r-- | apps/plugins/vu_meter.c | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c index af6bd6f397..a4d639ede6 100644 --- a/apps/plugins/vu_meter.c +++ b/apps/plugins/vu_meter.c | |||
@@ -24,32 +24,8 @@ | |||
24 | 24 | ||
25 | 25 | ||
26 | /* variable button definitions */ | 26 | /* variable button definitions */ |
27 | #if CONFIG_KEYPAD == RECORDER_PAD | 27 | #if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \ |
28 | #define VUMETER_QUIT BUTTON_OFF | 28 | (CONFIG_KEYPAD == IRIVER_H300_PAD) |
29 | #define VUMETER_HELP BUTTON_ON | ||
30 | #define VUMETER_MENU BUTTON_F1 | ||
31 | #define VUMETER_UP BUTTON_UP | ||
32 | #define VUMETER_DOWN BUTTON_DOWN | ||
33 | #define LABEL_HELP "ON" | ||
34 | #define LABEL_QUIT "OFF" | ||
35 | #define LABEL_MENU "F1" | ||
36 | #define LABEL_VOLUME "UP/DOWN" | ||
37 | |||
38 | #elif CONFIG_KEYPAD == ONDIO_PAD | ||
39 | #define VUMETER_QUIT BUTTON_OFF | ||
40 | #define VUMETER_HELP_PRE BUTTON_MENU | ||
41 | #define VUMETER_HELP (BUTTON_MENU | BUTTON_REL) | ||
42 | #define VUMETER_MENU_PRE BUTTON_MENU | ||
43 | #define VUMETER_MENU (BUTTON_MENU | BUTTON_REPEAT) | ||
44 | #define VUMETER_UP BUTTON_UP | ||
45 | #define VUMETER_DOWN BUTTON_DOWN | ||
46 | #define LABEL_HELP "MODE" | ||
47 | #define LABEL_QUIT "OFF" | ||
48 | #define LABEL_MENU "MODE.." | ||
49 | #define LABEL_VOLUME "UP/DOWN" | ||
50 | |||
51 | #elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \ | ||
52 | (CONFIG_KEYPAD == IRIVER_H300_PAD) | ||
53 | #define VUMETER_QUIT BUTTON_OFF | 29 | #define VUMETER_QUIT BUTTON_OFF |
54 | #define VUMETER_HELP BUTTON_ON | 30 | #define VUMETER_HELP BUTTON_ON |
55 | #define VUMETER_MENU BUTTON_SELECT | 31 | #define VUMETER_MENU BUTTON_SELECT |
@@ -804,10 +780,7 @@ static void draw_digital_minimeters(void) { | |||
804 | 780 | ||
805 | static void analog_meter(void) { | 781 | static void analog_meter(void) { |
806 | 782 | ||
807 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | 783 | #if (CONFIG_CODEC == SWCODEC) |
808 | int left_peak = rb->mas_codec_readreg(0xC); | ||
809 | int right_peak = rb->mas_codec_readreg(0xD); | ||
810 | #elif (CONFIG_CODEC == SWCODEC) | ||
811 | static struct pcm_peaks peaks; | 784 | static struct pcm_peaks peaks; |
812 | rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK, | 785 | rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK, |
813 | &peaks); | 786 | &peaks); |
@@ -864,10 +837,7 @@ static void analog_meter(void) { | |||
864 | } | 837 | } |
865 | 838 | ||
866 | static void digital_meter(void) { | 839 | static void digital_meter(void) { |
867 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | 840 | #if (CONFIG_CODEC == SWCODEC) |
868 | int left_peak = rb->mas_codec_readreg(0xC); | ||
869 | int right_peak = rb->mas_codec_readreg(0xD); | ||
870 | #elif (CONFIG_CODEC == SWCODEC) | ||
871 | static struct pcm_peaks peaks; | 841 | static struct pcm_peaks peaks; |
872 | rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK, | 842 | rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK, |
873 | &peaks); | 843 | &peaks); |