summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/plugin.c1
-rw-r--r--apps/plugin.h4
-rw-r--r--apps/plugins/oscilloscope.c3
-rw-r--r--apps/plugins/starfield.c3
-rw-r--r--apps/plugins/vu_meter.c3
-rw-r--r--apps/recorder/peakmeter.c4
6 files changed, 13 insertions, 5 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index bfb7f0e9c1..6b3d39973f 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -781,6 +781,7 @@ static const struct plugin_api rockbox_api = {
781#if CONFIG_CODEC == SWCODEC 781#if CONFIG_CODEC == SWCODEC
782 mixer_channel_status, 782 mixer_channel_status,
783 mixer_channel_get_buffer, 783 mixer_channel_get_buffer,
784 mixer_channel_calculate_peaks,
784#endif 785#endif
785}; 786};
786 787
diff --git a/apps/plugin.h b/apps/plugin.h
index aa39829daf..77c8e831d4 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -146,7 +146,7 @@ void* plugin_get_buffer(size_t *buffer_size);
146#define PLUGIN_MAGIC 0x526F634B /* RocK */ 146#define PLUGIN_MAGIC 0x526F634B /* RocK */
147 147
148/* increase this every time the api struct changes */ 148/* increase this every time the api struct changes */
149#define PLUGIN_API_VERSION 206 149#define PLUGIN_API_VERSION 207
150 150
151/* update this to latest version if a change to the api struct breaks 151/* update this to latest version if a change to the api struct breaks
152 backwards compatibility (and please take the opportunity to sort in any 152 backwards compatibility (and please take the opportunity to sort in any
@@ -911,6 +911,8 @@ struct plugin_api {
911#if CONFIG_CODEC == SWCODEC 911#if CONFIG_CODEC == SWCODEC
912 enum channel_status (*mixer_channel_status)(enum pcm_mixer_channel channel); 912 enum channel_status (*mixer_channel_status)(enum pcm_mixer_channel channel);
913 void * (*mixer_channel_get_buffer)(enum pcm_mixer_channel channel, int *count); 913 void * (*mixer_channel_get_buffer)(enum pcm_mixer_channel channel, int *count);
914 void (*mixer_channel_calculate_peaks)(enum pcm_mixer_channel channel,
915 int *left, int *right);
914#endif 916#endif
915}; 917};
916 918
diff --git a/apps/plugins/oscilloscope.c b/apps/plugins/oscilloscope.c
index 07bf1da8bb..5eb43fae62 100644
--- a/apps/plugins/oscilloscope.c
+++ b/apps/plugins/oscilloscope.c
@@ -826,7 +826,8 @@ enum plugin_status plugin_start(const void* parameter)
826 left = rb->mas_codec_readreg(0xC); 826 left = rb->mas_codec_readreg(0xC);
827 right = rb->mas_codec_readreg(0xD); 827 right = rb->mas_codec_readreg(0xD);
828#elif (CONFIG_CODEC == SWCODEC) 828#elif (CONFIG_CODEC == SWCODEC)
829 rb->pcm_calculate_peaks(&left, &right); 829 rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK,
830 &left, &right);
830#endif 831#endif
831 if (osc.orientation == OSC_HORIZ) 832 if (osc.orientation == OSC_HORIZ)
832 anim_horizontal(left, right); 833 anim_horizontal(left, right);
diff --git a/apps/plugins/starfield.c b/apps/plugins/starfield.c
index 5e832aa38a..e7bbb425be 100644
--- a/apps/plugins/starfield.c
+++ b/apps/plugins/starfield.c
@@ -422,7 +422,8 @@ int plugin_main(void)
422 /* Get the peaks. ( Borrowed from vu_meter ) */ 422 /* Get the peaks. ( Borrowed from vu_meter ) */
423#if (CONFIG_CODEC == SWCODEC) 423#if (CONFIG_CODEC == SWCODEC)
424 int left_peak, right_peak; 424 int left_peak, right_peak;
425 rb->pcm_calculate_peaks(&left_peak, &right_peak); 425 rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK,
426 &left_peak, &right_peak);
426#else 427#else
427 int left_peak = rb->mas_codec_readreg(0xC); 428 int left_peak = rb->mas_codec_readreg(0xC);
428 int right_peak = rb->mas_codec_readreg(0xD); 429 int right_peak = rb->mas_codec_readreg(0xD);
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c
index 5266214723..cb1a035678 100644
--- a/apps/plugins/vu_meter.c
+++ b/apps/plugins/vu_meter.c
@@ -660,7 +660,8 @@ void analog_meter(void) {
660 int right_peak = rb->mas_codec_readreg(0xD); 660 int right_peak = rb->mas_codec_readreg(0xD);
661#elif (CONFIG_CODEC == SWCODEC) 661#elif (CONFIG_CODEC == SWCODEC)
662 int left_peak, right_peak; 662 int left_peak, right_peak;
663 rb->pcm_calculate_peaks(&left_peak, &right_peak); 663 rb->mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK,
664 &left_peak, &right_peak);
664#endif 665#endif
665 666
666 if(vumeter_settings.analog_use_db_scale) { 667 if(vumeter_settings.analog_use_db_scale) {
diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c
index c13c4c9539..fd8f8d9fbe 100644
--- a/apps/recorder/peakmeter.c
+++ b/apps/recorder/peakmeter.c
@@ -44,6 +44,7 @@
44 44
45#if CONFIG_CODEC == SWCODEC 45#if CONFIG_CODEC == SWCODEC
46#include "pcm.h" 46#include "pcm.h"
47#include "pcm_mixer.h"
47 48
48#ifdef HAVE_RECORDING 49#ifdef HAVE_RECORDING
49#include "pcm_record.h" 50#include "pcm_record.h"
@@ -620,7 +621,8 @@ void peak_meter_peek(void)
620 /* read current values */ 621 /* read current values */
621#if CONFIG_CODEC == SWCODEC 622#if CONFIG_CODEC == SWCODEC
622 if (pm_playback) 623 if (pm_playback)
623 pcm_calculate_peaks(&pm_cur_left, &pm_cur_right); 624 mixer_channel_calculate_peaks(PCM_MIXER_CHAN_PLAYBACK,
625 &pm_cur_left, &pm_cur_right);
624#ifdef HAVE_RECORDING 626#ifdef HAVE_RECORDING
625 else 627 else
626 pcm_calculate_rec_peaks(&pm_cur_left, &pm_cur_right); 628 pcm_calculate_rec_peaks(&pm_cur_left, &pm_cur_right);