mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
talk_init() : don't try to load the voice file if it won't fit in memory
now playback still works if voicing is enabled on the clipv1 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26047 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
3c74d20462
commit
77ec4b301b
1 changed files with 3 additions and 1 deletions
|
@ -540,7 +540,9 @@ void talk_init(void)
|
|||
reset_state(); /* use this for most of our inits */
|
||||
|
||||
filehandle = open_voicefile();
|
||||
has_voicefile = (filehandle >= 0); /* test if we can open it */
|
||||
size_t audiobufsz = audiobufend - audiobuf;
|
||||
/* test if we can open and if it fits in the audiobuffer */
|
||||
has_voicefile = filehandle >= 0 && filesize(filehandle) > (off_t)audiobufsz;
|
||||
voicefile_size = 0;
|
||||
|
||||
if (has_voicefile)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue