summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2005-07-17 19:29:02 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2005-07-17 19:29:02 +0000
commite9919342c558bc6b1f843bbc6e900c5ef540ee8f (patch)
treed092164b82b50ca660652cf7207d61b7b703b494 /apps
parent170bb8eb78703bd6f2ae951e2292c89ae7565a29 (diff)
Initial attempt to support peak meter on iriver. It still has some
strange behaviour and readings might not be correct. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7182 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/recorder/peakmeter.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c
index 7746fb9f9f..002a3c48d5 100644
--- a/apps/recorder/peakmeter.c
+++ b/apps/recorder/peakmeter.c
@@ -32,6 +32,10 @@
#include "lang.h"
#include "peakmeter.h"
+#if CONFIG_HWCODEC == MASNONE
+#include "pcm_playback.h"
+#endif
+
/* no inline in simulator mode */
#ifdef SIMULATOR
#define inline
@@ -552,9 +556,9 @@ inline void peak_meter_peek(void)
int left = 8000;
int right = 9000;
#elif CONFIG_HWCODEC == MASNONE
- /* FIX */
- int left = 9000;
- int right = 8000;
+ int left;
+ int right;
+ pcm_calculate_peaks(&left, &right);
#else
/* read the peak values */
int left = mas_codec_readreg(peak_meter_src_l);
@@ -729,8 +733,7 @@ static int peak_meter_read_l (void)
#ifdef SIMULATOR
peak_meter_l = 8000;
#elif CONFIG_HWCODEC == MASNONE
- /* FIX */
- peak_meter_l = 8000;
+ pcm_calculate_peaks(&peak_meter_l, NULL);
#else
/* reset peak_meter_l so that subsequent calls of
peak_meter_peek doesn't get fooled by an old
@@ -758,8 +761,7 @@ static int peak_meter_read_r (void) {
#ifdef SIMULATOR
peak_meter_l = 8000;
#elif CONFIG_HWCODEC == MASNONE
- /* FIX */
- peak_meter_r = 8000;
+ pcm_calculate_peaks(NULL, &peak_meter_r);
#else
/* reset peak_meter_r so that subsequent calls of
peak_meter_peek doesn't get fooled by an old