summaryrefslogtreecommitdiff
path: root/firmware/pcm_record.c
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 /firmware/pcm_record.c
parent5b854a9a233daf5fa1bc25cc229c01627f402021 (diff)
downloadrockbox-ff862e19ccd6209cd13b91761fcf944a7e0abd11.tar.gz
rockbox-ff862e19ccd6209cd13b91761fcf944a7e0abd11.zip
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
Diffstat (limited to 'firmware/pcm_record.c')
-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 1810717dac..8805e73157 100644
--- a/firmware/pcm_record.c
+++ b/firmware/pcm_record.c
@@ -361,6 +361,8 @@ void pcm_rec_get_peaks(int *left, int *right)
361 *left = (int)peak_left; 361 *left = (int)peak_left;
362 if (right) 362 if (right)
363 *right = (int)peak_right; 363 *right = (int)peak_right;
364 peak_left = 0;
365 peak_right = 0;
364} 366}
365 367
366/***************************************************************************/ 368/***************************************************************************/
@@ -391,8 +393,6 @@ static void pcmrec_callback(bool flush)
391 if (num_new < 0) 393 if (num_new < 0)
392 num_new += num_chunks; 394 num_new += num_chunks;
393 395
394 peak_left = 0;
395 peak_right = 0;
396 for (i=0; i<num_new; i++) 396 for (i=0; i<num_new; i++)
397 { 397 {
398 /* Convert the samples to little-endian so we only have to write later 398 /* Convert the samples to little-endian so we only have to write later