From 5af1e2f5313458469dca17b580be29cb2e8158c7 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Thu, 8 Dec 2011 21:30:37 +0000 Subject: Add a second boost condition to the recording PCM buffer to boost the CPU when 75% full or more. This is especially important for small memory when the 1-second condition frequency cannot be reached. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31183 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/pcm_record.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/recorder/pcm_record.c b/apps/recorder/pcm_record.c index 30b681ab45..90a6163b8f 100644 --- a/apps/recorder/pcm_record.c +++ b/apps/recorder/pcm_record.c @@ -1759,9 +1759,11 @@ unsigned char * enc_get_pcm_data(size_t size) pcm_buffer, pcm_rd_pos); } - if (avail >= (sample_rate << 2)) + if (avail >= (sample_rate << 2) || + avail >= 3*(PCM_NUM_CHUNKS*PCM_CHUNK_SIZE) / 4) { - /* Filling up - boost codec */ + /* Filling up - 1s data available or more or 3/4 full or more - + boost codec */ trigger_cpu_boost(); } -- cgit v1.2.3