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 /firmware | |
parent | 4431ab237ef7a884b1dd6692334a03273cc3970d (diff) | |
download | rockbox-63ba93c9ca33094b61cdd4c14d8794fc78ddd1a2.tar.gz rockbox-63ba93c9ca33094b61cdd4c14d8794fc78ddd1a2.zip |
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
Diffstat (limited to 'firmware')
-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 f3098fac93..efe9f0eedf 100644 --- a/firmware/pcm_playback.c +++ b/firmware/pcm_playback.c | |||
@@ -774,11 +774,11 @@ void pcm_calculate_peaks(int *left, int *right) | |||
774 | #endif | 774 | #endif |
775 | 775 | ||
776 | if (samples > PEAK_SAMPLES) | 776 | if (samples > PEAK_SAMPLES) |
777 | samples = PEAK_SAMPLES - PEAK_STRIDE; | 777 | samples = PEAK_SAMPLES - (PEAK_STRIDE - 1); |
778 | else | 778 | else |
779 | samples -= MIN(PEAK_STRIDE, samples); | 779 | samples -= MIN(PEAK_STRIDE - 1, samples); |
780 | 780 | ||
781 | end = addr + samples * 4; | 781 | end = &addr[samples * 2]; |
782 | } | 782 | } |
783 | 783 | ||
784 | if (left && right) { | 784 | if (left && right) { |
@@ -796,7 +796,7 @@ void pcm_calculate_peaks(int *left, int *right) | |||
796 | else if (-value > right_peak) | 796 | else if (-value > right_peak) |
797 | right_peak = -value; | 797 | right_peak = -value; |
798 | 798 | ||
799 | addr += PEAK_STRIDE * 2; | 799 | addr = &addr[PEAK_STRIDE * 2]; |
800 | } | 800 | } |
801 | 801 | ||
802 | *left = left_peak; | 802 | *left = left_peak; |