diff options
Diffstat (limited to 'platform/ios')
-rw-r--r-- | platform/ios/detect.py | 14 | ||||
-rw-r--r-- | platform/ios/tts_ios.mm | 6 |
2 files changed, 14 insertions, 6 deletions
diff --git a/platform/ios/detect.py b/platform/ios/detect.py index 1a8d24d12d..3cfb25cf61 100644 --- a/platform/ios/detect.py +++ b/platform/ios/detect.py @@ -39,6 +39,9 @@ def get_flags(): ("arch", "arm64"), # Default for convenience. ("tools", False), ("use_volk", False), + # Disable by default even if production is set, as it makes linking in Xcode + # on exports very slow and that's not what most users expect. + ("lto", "none"), ] @@ -70,9 +73,14 @@ def configure(env): env.Append(CCFLAGS=["-gdwarf-2", "-O0"]) env.Append(CPPDEFINES=["_DEBUG", ("DEBUG", 1)]) - if env["use_lto"]: - env.Append(CCFLAGS=["-flto"]) - env.Append(LINKFLAGS=["-flto"]) + # LTO + if env["lto"] != "none": + if env["lto"] == "thin": + env.Append(CCFLAGS=["-flto=thin"]) + env.Append(LINKFLAGS=["-flto=thin"]) + else: + env.Append(CCFLAGS=["-flto"]) + env.Append(LINKFLAGS=["-flto"]) ## Compiler configuration diff --git a/platform/ios/tts_ios.mm b/platform/ios/tts_ios.mm index a079d02add..8319cad117 100644 --- a/platform/ios/tts_ios.mm +++ b/platform/ios/tts_ios.mm @@ -78,12 +78,12 @@ AVSpeechUtterance *new_utterance = [[AVSpeechUtterance alloc] initWithString:[NSString stringWithUTF8String:message.text.utf8().get_data()]]; [new_utterance setVoice:[AVSpeechSynthesisVoice voiceWithIdentifier:[NSString stringWithUTF8String:message.voice.utf8().get_data()]]]; if (message.rate > 1.f) { - [new_utterance setRate:Math::range_lerp(message.rate, 1.f, 10.f, AVSpeechUtteranceDefaultSpeechRate, AVSpeechUtteranceMaximumSpeechRate)]; + [new_utterance setRate:Math::remap(message.rate, 1.f, 10.f, AVSpeechUtteranceDefaultSpeechRate, AVSpeechUtteranceMaximumSpeechRate)]; } else if (message.rate < 1.f) { - [new_utterance setRate:Math::range_lerp(message.rate, 0.1f, 1.f, AVSpeechUtteranceMinimumSpeechRate, AVSpeechUtteranceDefaultSpeechRate)]; + [new_utterance setRate:Math::remap(message.rate, 0.1f, 1.f, AVSpeechUtteranceMinimumSpeechRate, AVSpeechUtteranceDefaultSpeechRate)]; } [new_utterance setPitchMultiplier:message.pitch]; - [new_utterance setVolume:(Math::range_lerp(message.volume, 0.f, 100.f, 0.f, 1.f))]; + [new_utterance setVolume:(Math::remap(message.volume, 0.f, 100.f, 0.f, 1.f))]; ids[new_utterance] = message.id; [av_synth speakUtterance:new_utterance]; |