diff options
Diffstat (limited to 'apps/plugins/vu_meter.c')
-rw-r--r-- | apps/plugins/vu_meter.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c index 51f2d19f40..ec884442d4 100644 --- a/apps/plugins/vu_meter.c +++ b/apps/plugins/vu_meter.c | |||
@@ -704,9 +704,11 @@ static void analog_meter(void) { | |||
704 | int left_peak = rb->mas_codec_readreg(0xC); | 704 | int left_peak = rb->mas_codec_readreg(0xC); |
705 | int right_peak = rb->mas_codec_readreg(0xD); | 705 | int right_peak = rb->mas_codec_readreg(0xD); |
706 | #elif (CONFIG_CODEC == SWCODEC) | 706 | #elif (CONFIG_CODEC == SWCODEC) |
707 | int left_peak, right_peak; | 707 | static struct pcm_peaks peaks; |
708 | rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK, | 708 | rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK, |
709 | &left_peak, &right_peak); | 709 | &peaks); |
710 | #define left_peak peaks.left | ||
711 | #define right_peak peaks.right | ||
710 | #endif | 712 | #endif |
711 | 713 | ||
712 | if(vumeter_settings.analog_use_db_scale) { | 714 | if(vumeter_settings.analog_use_db_scale) { |
@@ -762,8 +764,11 @@ static void digital_meter(void) { | |||
762 | int left_peak = rb->mas_codec_readreg(0xC); | 764 | int left_peak = rb->mas_codec_readreg(0xC); |
763 | int right_peak = rb->mas_codec_readreg(0xD); | 765 | int right_peak = rb->mas_codec_readreg(0xD); |
764 | #elif (CONFIG_CODEC == SWCODEC) | 766 | #elif (CONFIG_CODEC == SWCODEC) |
765 | int left_peak, right_peak; | 767 | static struct pcm_peaks peaks; |
766 | rb->pcm_calculate_peaks(&left_peak, &right_peak); | 768 | rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK, |
769 | &peaks); | ||
770 | #define left_peak peaks.left | ||
771 | #define right_peak peaks.right | ||
767 | #endif | 772 | #endif |
768 | 773 | ||
769 | if(vumeter_settings.digital_use_db_scale) { | 774 | if(vumeter_settings.digital_use_db_scale) { |