Voicefile: remove < and > from voice strings before speaking.

Some language files have the < and > characters the original string (like "<All
tracks>") has included in the voice strings. These characters cause the
generated wave file to not contain any samples with SAPI, causing an error when
Rockbox Utility tries to encode the file.

Since those characters don't make much sense in the voice string remove them
prior to speaking. Currently affected languages are basque, chinese-simp, and
russian, for which this fixes voicefile creation.

Change-Id: Iac7ccd7921ccfb5ddc33645239a1f8f7e639e5aa
This commit is contained in:
Dominik Riebeling 2012-04-26 20:42:18 +02:00
parent ab01d5d8c2
commit 51f1fcbe26

View file

@ -143,6 +143,7 @@ void VoiceFileCreator::downloadDone(bool error)
else if(line.contains("voice:")) // voice found
{
voice = line.remove("voice:").remove('"').trimmed();
voice = voice.remove("<").remove(">");
voicefound=true;
}