diff --git a/Assets/Cryville.EEW.Unity/SharedSettings.cs b/Assets/Cryville.EEW.Unity/SharedSettings.cs index 447d9b9..ef38f63 100644 --- a/Assets/Cryville.EEW.Unity/SharedSettings.cs +++ b/Assets/Cryville.EEW.Unity/SharedSettings.cs @@ -25,9 +25,20 @@ namespace Cryville.EEW.Unity { public IColorScheme ColorScheme { get; private set; } = new SeverityBasedColorScheme(DefaultSeverityScheme.Instance, DefaultSeverityColorMapping.Instance); public ISubColorScheme BorderColorScheme { get; private set; } = new WrappedColorScheme(new SeverityBasedColorScheme(DefaultSeverityScheme.Instance, DefaultSeverityColorMapping.SecondaryInstance)); public ISubColorScheme TextColorScheme { get; private set; } = new DefaultTextColorScheme(Color.White, Color.Black); - public ILocationConverter LocationConverter => new FERegionLongConverter(); // TODO TTS public TimeSpan NowcastWarningDelayTolerance => TimeSpan.FromMinutes(60); // TODO TTS + readonly int _infoLocationSpecificity = 3; + readonly int _ttsLocationSpecificity = 3; + readonly LocationNamer _locationNamer = new() { Namer = new FERegionLongNamer() }; // TODO TTS + public bool NameLocation(double lat, double lon, CultureInfo localCulture, ref CultureInfo targetCulture, out string name, out int specificity) { + specificity = _ttsLocationSpecificity; + return _locationNamer.Name(lat, lon, localCulture, ref targetCulture, out name, ref specificity); + } + public bool NameLocation(double lat, double lon, CultureInfo localCulture, ref CultureInfo targetCulture, out string name) { + int specificity = _infoLocationSpecificity; + return _locationNamer.Name(lat, lon, localCulture, ref targetCulture, out name, ref specificity); + } + public TimeZoneInfo OverrideTimeZone { get; private set; } public bool DoDisplayTimeZone { get; private set; } = true; public bool DoSwitchBackToHistory { get; private set; } = true; diff --git a/Assets/Cryville.EEW.Unity/SoundPlayer.cs b/Assets/Cryville.EEW.Unity/SoundPlayer.cs index 5156931..1e5926c 100644 --- a/Assets/Cryville.EEW.Unity/SoundPlayer.cs +++ b/Assets/Cryville.EEW.Unity/SoundPlayer.cs @@ -5,7 +5,7 @@ using System.IO; using UnityEngine; namespace Cryville.EEW.Unity { - class SoundPlayer : Core.SoundPlayer { + class SoundPlayer : Core.Audio.SoundPlayer { public SoundPlayer() : base(GetEngineList(), AudioUsage.NotificationEvent) { } static List GetEngineList() => new() { typeof(Audio.Wasapi.MMDeviceEnumeratorWrapper), diff --git a/Assets/Cryville.EEW.Unity/TTSWorker.cs b/Assets/Cryville.EEW.Unity/TTSWorker.cs index 2b4e24c..5227e77 100644 --- a/Assets/Cryville.EEW.Unity/TTSWorker.cs +++ b/Assets/Cryville.EEW.Unity/TTSWorker.cs @@ -4,7 +4,7 @@ using System.Threading; using System.Threading.Tasks; namespace Cryville.EEW.Unity { - class TTSWorker : Core.TTSWorker { + class TTSWorker : Core.Audio.TTSWorker { public TTSWorker() : base(CreateSoundPlayer()) { } static SoundPlayer CreateSoundPlayer() {