[vlc-commits] NSSpeech: do not silently call objectAtIndexedSubscript and objectForKeyedSubscript
Jean-Baptiste Kempf
git at videolan.org
Wed Dec 21 20:25:04 CET 2016
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Dec 21 20:23:24 2016 +0100| [fb706bcc9f061c614ce68150bfe0f6f19a6cd9b6] | committer: Jean-Baptiste Kempf
NSSpeech: do not silently call objectAtIndexedSubscript and objectForKeyedSubscript
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fb706bcc9f061c614ce68150bfe0f6f19a6cd9b6
---
modules/text_renderer/nsspeechsynthesizer.m | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/text_renderer/nsspeechsynthesizer.m b/modules/text_renderer/nsspeechsynthesizer.m
index 3651ddf..32d2512 100644
--- a/modules/text_renderer/nsspeechsynthesizer.m
+++ b/modules/text_renderer/nsspeechsynthesizer.m
@@ -139,14 +139,14 @@ static int RenderText(filter_t *p_filter,
NSRange range = NSMakeRange(0, 2);
for (NSUInteger i = 0; i < count; i++) {
- NSDictionary *voiceAttributes = [NSSpeechSynthesizer attributesForVoice:voices[i]];
- NSString *voiceLanguage = voiceAttributes[@"VoiceLanguage"];
+ NSDictionary *voiceAttributes = [NSSpeechSynthesizer attributesForVoice: [voices objectAtIndex:i]];
+ NSString *voiceLanguage = [voiceAttributes objectForKey:@"VoiceLanguage"];
if ([p_sys->currentLocale isEqualToString:[voiceLanguage substringWithRange:range]]) {
- NSString *voiceName = voiceAttributes[@"VoiceName"];
+ NSString *voiceName = [voiceAttributes objectForKey:@"VoiceName"];
msg_Dbg(p_filter, "switched to voice '%s'", [voiceName UTF8String]);
if ([voiceName isEqualToString:@"Agnes"] || [voiceName isEqualToString:@"Albert"])
continue;
- [p_sys->speechSynthesizer setVoice:voices[i]];
+ [p_sys->speechSynthesizer setVoice: [voices objectAtIndex:i]];
break;
}
}
More information about the vlc-commits
mailing list