diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2011-12-08 21:30:37 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2011-12-08 21:30:37 +0000 |
commit | 5af1e2f5313458469dca17b580be29cb2e8158c7 (patch) | |
tree | 47c8dd8c0ea8cc511831d78974d3a770a044bad9 | |
parent | e4dbcc414b4b91ceb6b5e80a4ad49e4270fee096 (diff) | |
download | rockbox-5af1e2f5313458469dca17b580be29cb2e8158c7.tar.gz 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
-rw-r--r-- | apps/recorder/pcm_record.c | 6 |
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) | |||
1759 | pcm_buffer, pcm_rd_pos); | 1759 | pcm_buffer, pcm_rd_pos); |
1760 | } | 1760 | } |
1761 | 1761 | ||
1762 | if (avail >= (sample_rate << 2)) | 1762 | if (avail >= (sample_rate << 2) || |
1763 | avail >= 3*(PCM_NUM_CHUNKS*PCM_CHUNK_SIZE) / 4) | ||
1763 | { | 1764 | { |
1764 | /* Filling up - boost codec */ | 1765 | /* Filling up - 1s data available or more or 3/4 full or more - |
1766 | boost codec */ | ||
1765 | trigger_cpu_boost(); | 1767 | trigger_cpu_boost(); |
1766 | } | 1768 | } |
1767 | 1769 | ||