diff options
| author | Brandon Low <lostlogic@rockbox.org> | 2006-03-09 21:25:08 +0000 |
|---|---|---|
| committer | Brandon Low <lostlogic@rockbox.org> | 2006-03-09 21:25:08 +0000 |
| commit | 7bc5bc4b495a6c31cce0e8df258b50f1bd3a7a44 (patch) | |
| tree | 7e9ad7841905d452aa4a0aeeb718d3eea617dbc0 | |
| parent | 19f4c2a093698940482aad6df0bd8478a82f2a9d (diff) | |
| download | rockbox-7bc5bc4b495a6c31cce0e8df258b50f1bd3a7a44.zip rockbox-7bc5bc4b495a6c31cce0e8df258b50f1bd3a7a44.tar.gz rockbox-7bc5bc4b495a6c31cce0e8df258b50f1bd3a7a44.tar.bz2 rockbox-7bc5bc4b495a6c31cce0e8df258b50f1bd3a7a44.tar.xz | |
Fix peakmeter reading off the end of the buffer, thanks to petur
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8981 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/pcm_playback.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/pcm_playback.c b/firmware/pcm_playback.c index 8bd44c7..f3098fa 100644 --- a/firmware/pcm_playback.c +++ b/firmware/pcm_playback.c @@ -774,9 +774,9 @@ void pcm_calculate_peaks(int *left, int *right) #endif if (samples > PEAK_SAMPLES) - samples = PEAK_SAMPLES - (PEAK_STRIDE - 1); + samples = PEAK_SAMPLES - PEAK_STRIDE; else - samples -= MIN((PEAK_STRIDE - 1), samples); + samples -= MIN(PEAK_STRIDE, samples); end = addr + samples * 4; } |