This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#11587 - Voice for SWCODEC and low memory
Attached to Project:
Rockbox
Opened by Rafaël Carré (funman) - Tuesday, 31 August 2010, 02:06 GMT+2
Last edited by Rafaël Carré (funman) - Wednesday, 01 September 2010, 02:10 GMT+2
Opened by Rafaël Carré (funman) - Tuesday, 31 August 2010, 02:06 GMT+2
Last edited by Rafaël Carré (funman) - Wednesday, 01 September 2010, 02:10 GMT+2
|
DetailsVoice doesn't work on Clipv1/c200v2 & cie, the voice file is too big to fit entirely in RAM
Trying to use a voice file will give a panic on startup. This patch reuses the code set up for the Ondios (which load the entire file in RAM but progressively), and will only load 64 (the size of the clips queue) clips maximum, (+ the "SILENCE" clip). It reserves 64 * the_size_of_the_biggest_clip bytes, which is ~300kB for the default voice on Clipv1 (450kB audiobuffer left after that). It works correctly at startup but later fails (easily seen when spelling a directory for example) |
This task depends upon
Closed by Rafaël Carré (funman)
Wednesday, 01 September 2010, 02:10 GMT+2
Reason for closing: Accepted
Additional comments about closing: r27961
Wednesday, 01 September 2010, 02:10 GMT+2
Reason for closing: Accepted
Additional comments about closing: r27961
Bump the age of each buffered clip when we are loading a new entry, and reset the age for the clip to 0 each time it is used.
When we load a new entry we unload the oldest entry. It works in O(n) because finding the oldest entry is done in the same loop than bumping the ages of loaded clips.
I will commit it sometime soon.