Terminate the string to be spoken (via espeak) with two NULs.
(The last parts of some strings are mis-spoken; seems to be length-dependent.) git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2152 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
8d77a7b467
commit
79c72b7c76
@ -7998,8 +7998,10 @@ static OOComparisonResult comparePrice(id dict1, id dict2, void * context)
|
||||
text = [frags componentsJoinedByString:@""];
|
||||
#endif
|
||||
size_t length = [text length];
|
||||
const char *ctext = [text cString];
|
||||
espeak_Synth(ctext, length + 1 /* inc. NUL */, 0, POS_CHARACTER, length, espeakCHARS_UTF8 | espeakPHONEMES | espeakENDPAUSE, NULL, NULL);
|
||||
char *ctext = malloc (length + 2);
|
||||
sprintf (ctext, "%s%c", [text cString], 0); // extra NUL; working around an apparent misrendering bug...
|
||||
espeak_Synth(ctext, length + 2 /* inc. NULs */, 0, POS_CHARACTER, length, espeakCHARS_UTF8 | espeakPHONEMES | espeakENDPAUSE, NULL, NULL);
|
||||
free (ctext);
|
||||
}
|
||||
|
||||
- (void) stopSpeaking
|
||||
|
Loading…
x
Reference in New Issue
Block a user