summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2006-03-09 22:27:39 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2006-03-09 22:27:39 +0000
commitff862e19ccd6209cd13b91761fcf944a7e0abd11 (patch)
tree36a986b9af5419e6b2c8f4fe2fcac6ad7633a2c1
parent5b854a9a233daf5fa1bc25cc229c01627f402021 (diff)
downloadrockbox-ff862e19ccd6209cd13b91761fcf944a7e0abd11.zip
rockbox-ff862e19ccd6209cd13b91761fcf944a7e0abd11.tar.gz
rockbox-ff862e19ccd6209cd13b91761fcf944a7e0abd11.tar.bz2
rockbox-ff862e19ccd6209cd13b91761fcf944a7e0abd11.tar.xz
Yet another recording peakmeter sensitivity fix: only reset peak values after they've been read
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8985 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/pcm_record.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/pcm_record.c b/firmware/pcm_record.c
index 1810717..8805e73 100644
--- a/firmware/pcm_record.c
+++ b/firmware/pcm_record.c
@@ -361,6 +361,8 @@ void pcm_rec_get_peaks(int *left, int *right)
*left = (int)peak_left;
if (right)
*right = (int)peak_right;
+ peak_left = 0;
+ peak_right = 0;
}
/***************************************************************************/
@@ -391,8 +393,6 @@ static void pcmrec_callback(bool flush)
if (num_new < 0)
num_new += num_chunks;
- peak_left = 0;
- peak_right = 0;
for (i=0; i<num_new; i++)
{
/* Convert the samples to little-endian so we only have to write later