1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-23 12:37:30 +08:00

Localise WASAPI setting

This commit is contained in:
Denis Titovets
2025-11-07 14:46:40 +03:00
Unverified
parent 3c215f6574
commit 04d2ce150a
2 changed files with 18 additions and 6 deletions
@@ -99,6 +99,21 @@ namespace osu.Game.Localisation
/// </summary>
public static LocalisableString AdjustBeatmapOffsetAutomaticallyTooltip => new TranslatableString(getKey(@"adjust_beatmap_offset_automatically_tooltip"), @"If enabled, the offset suggested from last play on a beatmap is automatically applied.");
/// <summary>
/// "Use experimental audio mode"
/// </summary>
public static LocalisableString WasapiLabel => new TranslatableString(getKey(@"wasapi_label"), @"Use experimental audio mode");
/// <summary>
/// "This will attempt to initialise the audio engine in a lower latency mode."
/// </summary>
public static LocalisableString WasapiTooltip => new TranslatableString(getKey(@"wasapi_tooltip"), @"This will attempt to initialise the audio engine in a lower latency mode.");
/// <summary>
/// "Due to reduced latency, your audio offset will need to be adjusted when enabling this setting. Generally expect to subtract 20 - 60 ms from your known value."
/// </summary>
public static LocalisableString WasapiNotice => new TranslatableString(getKey(@"wasapi_notice"), @"Due to reduced latency, your audio offset will need to be adjusted when enabling this setting. Generally expect to subtract 20 - 60 ms from your known value.");
private static string getKey(string key) => $@"{prefix}:{key}";
}
}
@@ -41,8 +41,8 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
{
Add(wasapiExperimental = new SettingsCheckbox
{
LabelText = "Use experimental audio mode",
TooltipText = "This will attempt to initialise the audio engine in a lower latency mode.",
LabelText = AudioSettingsStrings.WasapiLabel,
TooltipText = AudioSettingsStrings.WasapiTooltip,
Current = audio.UseExperimentalWasapi,
Keywords = new[] { "wasapi", "latency", "exclusive" }
});
@@ -64,10 +64,7 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
if (wasapiExperimental != null)
{
if (wasapiExperimental.Current.Value)
{
wasapiExperimental.SetNoticeText(
"Due to reduced latency, your audio offset will need to be adjusted when enabling this setting. Generally expect to subtract 20 - 60 ms from your known value.", true);
}
wasapiExperimental.SetNoticeText(AudioSettingsStrings.WasapiNotice, true);
else
wasapiExperimental.ClearNoticeText();
}