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
This commit is contained in:
Michael Sevakis 2011-12-08 21:30:37 +00:00
parent e4dbcc414b
commit 5af1e2f531

View file

@ -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();
}