summaryrefslogtreecommitdiffstats
path: root/apps/recorder
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-12-08 21:30:37 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-12-08 21:30:37 +0000
commit5af1e2f5313458469dca17b580be29cb2e8158c7 (patch)
tree47c8dd8c0ea8cc511831d78974d3a770a044bad9 /apps/recorder
parente4dbcc414b4b91ceb6b5e80a4ad49e4270fee096 (diff)
downloadrockbox-5af1e2f5313458469dca17b580be29cb2e8158c7.tar.gz
rockbox-5af1e2f5313458469dca17b580be29cb2e8158c7.tar.bz2
rockbox-5af1e2f5313458469dca17b580be29cb2e8158c7.zip
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
Diffstat (limited to 'apps/recorder')
-rw-r--r--apps/recorder/pcm_record.c6
1 files 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();
}