[Scummvm-git-logs] scummvm master -> 3b7af3e057809a44c7da50be820e77b287c8c8d4
dwatteau
noreply at scummvm.org
Sun Mar 15 19:47:42 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
3b7af3e057 TTS: MACOSX: Improve NSSpeechSynthesizer compat with OSX 10.5
Commit: 3b7af3e057809a44c7da50be820e77b287c8c8d4
https://github.com/scummvm/scummvm/commit/3b7af3e057809a44c7da50be820e77b287c8c8d4
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2026-03-15T20:46:35+01:00
Commit Message:
TTS: MACOSX: Improve NSSpeechSynthesizer compat with OSX 10.5
That's not all it needs for Leopard (the `configure` script in
particular needs adjustments) but here's a first chunk of fixes.
Changed paths:
backends/text-to-speech/macosx/macosx-text-to-speech.mm
diff --git a/backends/text-to-speech/macosx/macosx-text-to-speech.mm b/backends/text-to-speech/macosx/macosx-text-to-speech.mm
index 6640562c215..ecce0b7b26f 100644
--- a/backends/text-to-speech/macosx/macosx-text-to-speech.mm
+++ b/backends/text-to-speech/macosx/macosx-text-to-speech.mm
@@ -27,6 +27,8 @@
#if defined(USE_TTS) && defined(MACOSX)
#include "common/translation.h"
#include <AppKit/NSSpeechSynthesizer.h>
+#include <Foundation/NSArray.h>
+#include <Foundation/NSDictionary.h>
#include <Foundation/NSString.h>
#include <CoreFoundation/CFString.h>
@@ -266,8 +268,11 @@ void MacOSXTextToSpeechManager::updateVoices() {
Common::String lang = getLanguage();
NSArray *voices = [NSSpeechSynthesizer availableVoices];
NSString *defaultVoice = [NSSpeechSynthesizer defaultVoice];
+ NSEnumerator *voiceEnum = [voices objectEnumerator];
+ NSString *voiceId;
int voiceIndex = 0;
- for (NSString *voiceId in voices) {
+
+ while ((voiceId = [voiceEnum nextObject])) {
NSDictionary *voiceAttr = [NSSpeechSynthesizer attributesForVoice:voiceId];
Common::String voiceLocale([[voiceAttr objectForKey:NSVoiceLocaleIdentifier] UTF8String]);
if (voiceLocale.hasPrefix(lang)) {
More information about the Scummvm-git-logs
mailing list