diff options
| author | Brandon Low <lostlogic@rockbox.org> | 2006-03-10 13:47:12 +0000 |
|---|---|---|
| committer | Brandon Low <lostlogic@rockbox.org> | 2006-03-10 13:47:12 +0000 |
| commit | 63ba93c9ca33094b61cdd4c14d8794fc78ddd1a2 (patch) | |
| tree | 3e6c1fe71970fbb82370ed76127da14b6a7e8a70 | |
| parent | 4431ab237ef7a884b1dd6692334a03273cc3970d (diff) | |
| download | rockbox-63ba93c9ca33094b61cdd4c14d8794fc78ddd1a2.zip rockbox-63ba93c9ca33094b61cdd4c14d8794fc78ddd1a2.tar.gz rockbox-63ba93c9ca33094b61cdd4c14d8794fc78ddd1a2.tar.bz2 rockbox-63ba93c9ca33094b61cdd4c14d8794fc78ddd1a2.tar.xz | |
Revert non-functional peakmeter fix, fix it for real? this time
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8990 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/pcm_playback.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/pcm_playback.c b/firmware/pcm_playback.c index f3098fa..efe9f0e 100644 --- a/firmware/pcm_playback.c +++ b/firmware/pcm_playback.c @@ -774,11 +774,11 @@ void pcm_calculate_peaks(int *left, int *right) #endif if (samples > PEAK_SAMPLES) - samples = PEAK_SAMPLES - PEAK_STRIDE; + samples = PEAK_SAMPLES - (PEAK_STRIDE - 1); else - samples -= MIN(PEAK_STRIDE, samples); + samples -= MIN(PEAK_STRIDE - 1, samples); - end = addr + samples * 4; + end = &addr[samples * 2]; } if (left && right) { @@ -796,7 +796,7 @@ void pcm_calculate_peaks(int *left, int *right) else if (-value > right_peak) right_peak = -value; - addr += PEAK_STRIDE * 2; + addr = &addr[PEAK_STRIDE * 2]; } *left = left_peak; |