Compare commits

..

3 Commits

Author SHA1 Message Date
maj00r 267b72863d feat(settings): the standard mode keeps the sound device and its effects, the rest is the developer tab's
The standard mode shows the sound options a player understands: the output
device, the speaker layout (with headphones), the Doppler effect, the muffled
sounds outside the cab and the air absorption.

HRTF and its data set, the resampler, the output limiter and the mixing rate
go to a Sound section of the Developer tab. Leaving the advanced mode puts
them back to the library's own choice, as it does with the rest of that tab.
2026-12-04 23:10:39 +01:00
maj00r bde6676dff Merge branch 'staging' into feat/audio-settings
# Conflicts:
#	StarterNG/Infrastructure/Settings/SettingsSerializer.cs
#	StarterNG/Views/Settings.axaml.cs
#	StarterNG/startercfg/lang/en.xml
#	StarterNG/startercfg/lang/pl.xml
2026-12-04 23:10:39 +01:00
maj00r 170bb58487 feat(settings): the simulator's OpenAL Soft options in the sound category
A new "Sound device and effects" section sets the eu07.ini keys the simulator
reads for OpenAL Soft: sound.openal.renderer (device), sound.outputmode,
sound.hrtf, sound.hrtf.profile, sound.resampler, sound.limiter,
sound.frequency, sound.doppler, sound.efx.lowpass and
sound.efx.airabsorption.

The lists of devices, HRTF data sets and resamplers come from the OpenAL
library in the game folder (OpenAL32.dll / libopenal.so.1), read in the
background through NativeLibrary and function pointers (AllowUnsafeBlocks);
without it, or with an older library, the lists hold the file's value and the
library's choice. Names with spaces are written in quotes, an empty name takes
its line out, and a key the file lacks is written only when it differs from
the simulator's default, so saving with these left alone adds nothing.

sound.maxsources is left out: OpenAL Soft gives at least 256 sources
whatever is asked, so it would be a setting that does nothing; a line the
file has stays as it is. A device name code page 1250 cannot hold, the
encoding of eu07.ini, is not offered, as it would reach the simulator as
question marks. HRTF data sets and resamplers are offered only with ASCII
names, since the simulator looks those up by the library's own spelling. A
value a slider can't show, outside its range or between its ticks, is kept
by the page's shown-unlike bookkeeping until the slider is moved.

Strings in en and pl with descriptions, labels in cz, hu and ru.
2026-11-17 14:34:28 +01:00
32 changed files with 815 additions and 272 deletions
-72
View File
@@ -1,72 +0,0 @@
using Avalonia.Controls;
using StarterNG.Controls;
namespace StarterNG.Tests;
[Collection(AvaloniaControls.Name)]
public class PrecipitationItemTests
{
// Shown in whatever language the tests run in: the key alone, or English once a test built the application.
private static void ShowsText(string key, PrecipitationItem item)
{
Assert.Equal(key, item.Key);
Assert.Equal(AppLanguage.Text(key), item.Content);
}
[Fact]
public void Light_precipitation_is_light_rain_until_told_it_snows()
{
var item = new PrecipitationItem();
ShowsText("OvercastRainLight", item);
item.Snow = true;
ShowsText("OvercastSnowLight", item);
}
[Fact]
public void Heavy_precipitation_is_rain_or_snow()
{
var item = new PrecipitationItem { Heavy = true };
ShowsText("OvercastRain", item);
item.Snow = true;
ShowsText("OvercastSnow", item);
}
[Fact]
public void The_option_keeps_its_name_in_a_dropdown_and_out_of_it()
{
var item = new PrecipitationItem { Heavy = true, Snow = true };
var combo = new ComboBox { Items = { item } };
ShowsText("OvercastSnow", item);
combo.Items.Remove(item);
item.Snow = false;
ShowsText("OvercastRain", item);
}
[Fact]
public void In_a_window_the_option_looks_like_any_other_and_still_follows_the_temperature()
{
var item = new PrecipitationItem { Heavy = true };
var combo = new ComboBox { Items = { new ComboBoxItem { Content = "Bezchmurnie" }, item } };
var window = Controls.Show(combo, themed: true);
combo.IsDropDownOpen = true;
window.UpdateLayout();
Assert.NotNull(item.Template);
item.Snow = true;
ShowsText("OvercastSnow", item);
window.Close();
item.Snow = false;
ShowsText("OvercastRain", item);
}
}
+1 -27
View File
@@ -78,36 +78,10 @@ public class SceneryWeatherTests
{
var weather = new SceneryWeather { Overcast = 0.42, OvercastRandom = true };
Assert.Equal(0, weather.EffectiveOvercast(new StubRandom()));
Assert.Equal(-1.5, weather.EffectiveOvercast(new StubRandom()));
Assert.Equal(0.42, new SceneryWeather { Overcast = 0.42 }.EffectiveOvercast(new StubRandom()));
}
[Fact]
public void No_random_overcast_preset_is_one_the_simulator_would_draw_again()
{
var weather = new SceneryWeather { OvercastRandom = true };
for (int i = 0; i < 10; i++)
Assert.InRange(weather.EffectiveOvercast(new StubRandom(i)), 0, 2);
}
[Fact]
public void A_negative_overcast_in_the_scenery_is_read_as_random()
{
var weather = TestScenery.Parser(new DateTime(2026, 1, 1))
.Parse("scenery/x.scn", "atmo 0 0 0 50 900 0 0 0 -1.5 endatmo").Weather;
Assert.True(weather.OvercastRandom);
Assert.False(weather.Changed);
}
[Theory]
[InlineData(2, false)]
[InlineData(1, true)]
[InlineData(-10, true)]
public void Precipitation_is_snow_at_or_below_one_degree(double temperature, bool snow) =>
Assert.Equal(snow, SceneryWeather.Snows(temperature));
private static string Rewritten(string scn) =>
SceneryWeatherWriter.Rewrite(scn, new SceneryWeather(), new StubRandom());
+99
View File
@@ -1286,6 +1286,34 @@ public class SettingsStoreTests
Assert.Equal(60, store.Settings.FieldOfView);
}
// Leaving the advanced mode puts the developer tab's sound options back; the device and the effects
// of the standard mode stay as the player chose them.
[Fact]
public void The_developer_tabs_sound_options_go_back_to_the_librarys_own_alone()
{
var installation = WithHome(new InMemoryFileSystem().WithFile(UserIni,
"sound.openal.renderer \"Speakers (USB)\"\nsound.outputmode headphones\nsound.hrtf on\n" +
"sound.hrtf.profile \"Built-In HRTF\"\nsound.resampler bsinc24\nsound.limiter off\nsound.frequency 48000\n" +
"sound.doppler 0.5\nsound.efx.lowpass yes\n"));
var store = installation.SettingsStore;
store.Load();
var reset = store.WithDefaults(store.Settings, new[]
{
"sound.hrtf", "sound.hrtf.profile", "sound.resampler", "sound.limiter", "sound.frequency"
});
Assert.Equal("auto", reset.AudioHrtf);
Assert.Equal("", reset.AudioHrtfProfile);
Assert.Equal("", reset.AudioResampler);
Assert.Equal("auto", reset.AudioLimiter);
Assert.Equal(0, reset.AudioFrequency);
Assert.Equal("Speakers (USB)", reset.AudioDevice);
Assert.Equal("headphones", reset.AudioOutputMode);
Assert.Equal(0.5, reset.AudioDoppler);
Assert.True(reset.AudioLowpass);
}
// The render scale put back is the whole window, whichever way the file had it.
[Theory]
[InlineData("width 1920\nheight 1080\ngfx.buffer.percent 0.5\n")]
@@ -1679,4 +1707,75 @@ public class SettingsStoreTests
Assert.Null(LineFor(installation, "blackbox"));
}
[Fact]
public void The_sound_device_options_left_alone_add_nothing_to_the_file()
{
var installation = WithHome(new InMemoryFileSystem().WithFile(UserIni, "width 1920\n"));
installation.SettingsStore.Load();
installation.SettingsStore.Save();
string saved = SavedLines(installation);
foreach (var key in new[] { "sound.openal.renderer", "sound.outputmode", "sound.hrtf", "sound.hrtf.profile",
"sound.resampler", "sound.limiter", "sound.frequency", "sound.maxsources",
"sound.doppler", "sound.efx.lowpass", "sound.efx.airabsorption" })
Assert.Null(LineFor(installation, key));
Assert.Contains("width 1920\n", saved);
}
[Fact]
public void The_sound_device_options_survive_a_round_trip_with_names_in_quotes()
{
var installation = WithHome();
installation.SettingsStore.Load();
var s = installation.SettingsStore.Settings;
s.AudioDevice = "OpenAL Soft on Speakers (Realtek(R) Audio)";
s.AudioOutputMode = "headphones";
s.AudioHrtf = "on";
s.AudioHrtfProfile = "Built-In HRTF";
s.AudioResampler = "Cubic";
s.AudioLimiter = "off";
s.AudioFrequency = 48000;
s.AudioDoppler = 0.5;
s.AudioLowpass = true;
s.AudioAirAbsorption = 1.0;
installation.SettingsStore.Save();
Assert.Equal("sound.openal.renderer \"OpenAL Soft on Speakers (Realtek(R) Audio)\"",
LineFor(installation, "sound.openal.renderer"));
Assert.Equal("sound.resampler Cubic", LineFor(installation, "sound.resampler"));
Assert.Empty(BareSimulatorKeys(installation));
var again = WithHome(new InMemoryFileSystem().WithFile(UserIni, installation.Files.ReadAllText(UserIni)));
again.SettingsStore.Load();
var read = again.SettingsStore.Settings;
Assert.Equal(s.AudioDevice, read.AudioDevice);
Assert.Equal("headphones", read.AudioOutputMode);
Assert.Equal("on", read.AudioHrtf);
Assert.Equal("Built-In HRTF", read.AudioHrtfProfile);
Assert.Equal("Cubic", read.AudioResampler);
Assert.Equal("off", read.AudioLimiter);
Assert.Equal(48000, read.AudioFrequency);
Assert.Equal(0.5, read.AudioDoppler, 6);
Assert.True(read.AudioLowpass);
Assert.Equal(1.0, read.AudioAirAbsorption, 6);
}
[Fact]
public void A_sound_name_set_back_to_the_librarys_choice_takes_its_line_out()
{
var installation = WithHome(new InMemoryFileSystem()
.WithFile(UserIni, "sound.openal.renderer \"Old Device\"\nsound.resampler Cubic\n"));
installation.SettingsStore.Load();
Assert.Equal("Old Device", installation.SettingsStore.Settings.AudioDevice);
installation.SettingsStore.Settings.AudioDevice = "";
installation.SettingsStore.Settings.AudioResampler = "";
installation.SettingsStore.Save();
Assert.Null(LineFor(installation, "sound.openal.renderer"));
Assert.Null(LineFor(installation, "sound.resampler"));
}
}
+5 -9
View File
@@ -14,7 +14,7 @@ public class SoftwareRenderTests
}
[Fact]
public void Without_the_switch_it_is_not_asked_for()
public void Without_the_switch_the_graphics_card_draws()
{
Assert.False(SoftwareRender.AskedIn(Array.Empty<string>()));
Assert.False(SoftwareRender.AskedIn(new[] { "--software" }));
@@ -25,25 +25,21 @@ public class SoftwareRenderTests
{
var options = SoftwareRender.Win32Options;
// No WinUI composition, DirectComposition or swap chain of the graphics card's.
Assert.Equal(new[] { Win32RenderingMode.Software }, options.RenderingMode);
Assert.Equal(new[] { Win32CompositionMode.RedirectionSurface }, options.CompositionMode);
}
[Fact]
public void X11_draws_on_the_processor_when_asked()
public void X11_draws_on_the_processor()
{
Assert.Equal(new[] { X11RenderingMode.Software }, SoftwareRender.X11Options.RenderingMode);
}
[Theory]
[InlineData(false)]
[InlineData(true)]
public void The_options_go_to_the_same_builder_with_or_without_the_switch(bool asked)
[Fact]
public void Both_platforms_options_go_to_the_same_builder()
{
var builder = AppBuilder.Configure<Avalonia.Application>();
string[] args = asked ? new[] { SoftwareRender.Switch } : Array.Empty<string>();
Assert.Same(builder, SoftwareRender.ApplyTo(builder, args));
Assert.Same(builder, SoftwareRender.ApplyTo(builder));
}
}
-14
View File
@@ -79,20 +79,6 @@ public class TrainsetDisplayTests
Assert.True(TrainsetDisplay.StartableIn(decor, Mode(advanced: true)));
}
[Fact]
public void The_standard_mode_changes_the_crew_but_not_in_the_simulators_own_consists()
{
var standard = Mode(advanced: false);
var decor = new Trainset("trainset a tor 0 0 //$decor\nnode -1 0 v1 dynamic d s m 0 headdriver 3 0 enddynamic\nendtrainset");
Assert.True(TrainsetDisplay.CrewEditableIn(Consist(), standard));
Assert.True(TrainsetDisplay.CrewEditableIn(Consist(driver: "nobody"), standard));
Assert.True(TrainsetDisplay.CrewEditableIn(null, standard));
Assert.False(TrainsetDisplay.CrewEditableIn(Consist(description: "-ai"), standard));
Assert.False(TrainsetDisplay.CrewEditableIn(decor, standard));
Assert.True(TrainsetDisplay.CrewEditableIn(Consist(description: "-ai"), Mode(advanced: true)));
}
[Fact]
public void The_filters_work_in_the_advanced_mode()
{
+46
View File
@@ -0,0 +1,46 @@
using Avalonia;
using StarterNG.Infrastructure;
namespace StarterNG.Tests;
public class WindowSurfacesTests
{
[Fact]
public void Windows_draws_into_a_directcomposition_surface_and_never_through_winui_composition()
{
var options = WindowSurfaces.Win32Options;
Assert.Equal(Win32CompositionMode.DirectComposition, options.CompositionMode.First());
Assert.DoesNotContain(Win32CompositionMode.WinUIComposition, options.CompositionMode);
}
[Fact]
public void The_window_surface_is_only_the_fallback()
{
// There ANGLE presents through a swap chain, and the Steam overlay draws over it.
Assert.Equal(Win32CompositionMode.RedirectionSurface, WindowSurfaces.Win32Options.CompositionMode.Last());
}
[Fact]
public void No_swap_chain_of_its_own_is_asked_for()
{
Assert.DoesNotContain(Win32CompositionMode.LowLatencyDxgiSwapChain, WindowSurfaces.Win32Options.CompositionMode);
}
[Fact]
public void The_graphics_card_still_draws()
{
Assert.Equal(new Win32PlatformOptions().RenderingMode, WindowSurfaces.Win32Options.RenderingMode);
Assert.Contains(Win32RenderingMode.AngleEgl, WindowSurfaces.Win32Options.RenderingMode);
}
[Theory]
[InlineData(false)]
[InlineData(true)]
public void The_options_go_to_the_same_builder_with_or_without_the_processor(bool softwareRender)
{
var builder = AppBuilder.Configure<Avalonia.Application>();
Assert.Same(builder, WindowSurfaces.ApplyTo(builder, softwareRender));
}
}
-61
View File
@@ -1,61 +0,0 @@
using System;
using Avalonia;
using Avalonia.Controls;
using Avalonia.LogicalTree;
namespace StarterNG.Controls;
/// <summary>
/// An overcast option above 1, where the simulator rains or, at 1 °C and below, snows:
/// named for what falls, light or not, in the starter's language.
/// </summary>
public class PrecipitationItem : ComboBoxItem
{
public static readonly StyledProperty<bool> HeavyProperty =
AvaloniaProperty.Register<PrecipitationItem, bool>(nameof(Heavy));
public static readonly StyledProperty<bool> SnowProperty =
AvaloniaProperty.Register<PrecipitationItem, bool>(nameof(Snow));
public PrecipitationItem() => UpdateText();
/// <summary>Rain or snow rather than light rain or light snow.</summary>
public bool Heavy
{
get => GetValue(HeavyProperty);
set => SetValue(HeavyProperty, value);
}
public bool Snow
{
get => GetValue(SnowProperty);
set => SetValue(SnowProperty, value);
}
protected override Type StyleKeyOverride => typeof(ComboBoxItem);
/// <summary>The key of the text the option is named by.</summary>
public string Key => (Snow ? "OvercastSnow" : "OvercastRain") + (Heavy ? "" : "Light");
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
{
base.OnPropertyChanged(change);
if (change.Property == HeavyProperty || change.Property == SnowProperty)
UpdateText();
}
protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
{
base.OnAttachedToLogicalTree(e);
AppLanguage.Changed += UpdateText;
UpdateText();
}
protected override void OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs e)
{
AppLanguage.Changed -= UpdateText;
base.OnDetachedFromLogicalTree(e);
}
private void UpdateText() => Content = AppLanguage.Text(Key);
}
+1 -8
View File
@@ -8,14 +8,7 @@ public sealed class SceneryWeather
public const int FogMin = 10;
public const int FogMax = 10000;
/// <summary>
/// What the simulator makes of each: up to 0.1 clear, 0.5 scattered, 0.9 broken,
/// 1 overcast; above 1 it rains or snows, the denser from 1.35 on.
/// </summary>
private static readonly double[] OvercastPresets = { 0, 0.3, 0.7, 1, 1.1, 1.5 };
/// <summary>The simulator rains above 1 °C and snows at that or below.</summary>
public static bool Snows(double temperature) => temperature <= 1;
private static readonly double[] OvercastPresets = { -1.5, 0, 0.3, 0.7, 1, 1.1, 1.5 };
private string _authoredTime = "10:30";
private string _authoredTimeOverride = "10:30";
@@ -136,6 +136,29 @@ public sealed class SimulatorSettings
public int VehiclesVolume = 100;
public int PositionalVolume = 100;
public int AmbientVolume = 100;
// OpenAL Soft options of the simulator; the defaults leave the choice to the library, as the
// simulator did before it had these keys.
/// <summary>sound.openal.renderer: the output device, empty for the system's default.</summary>
public string AudioDevice = "";
/// <summary>sound.outputmode: auto, mono, stereo, stereo-basic, uhj, headphones, quad, 5.1, 6.1, 7.1.</summary>
public string AudioOutputMode = "auto";
/// <summary>sound.hrtf: auto, on, off.</summary>
public string AudioHrtf = "auto";
/// <summary>sound.hrtf.profile: the HRTF data set, empty for the library's choice.</summary>
public string AudioHrtfProfile = "";
/// <summary>sound.resampler: empty for the library's default.</summary>
public string AudioResampler = "";
/// <summary>sound.limiter: auto, on, off.</summary>
public string AudioLimiter = "auto";
/// <summary>sound.frequency: the mixing rate in Hz, 0 for the device's.</summary>
public int AudioFrequency;
/// <summary>sound.doppler: the strength of the Doppler effect.</summary>
public double AudioDoppler = 0.25;
/// <summary>sound.efx.lowpass: soundproofing also muffles the high frequencies.</summary>
public bool AudioLowpass;
/// <summary>sound.efx.airabsorption: 0-10, the high frequencies fade with distance.</summary>
public double AudioAirAbsorption;
public bool SkipPipeline;
public int PythonScreenUpdateRate = 200;
public bool DebugLogVisible;
-8
View File
@@ -52,14 +52,6 @@ public static class TrainsetDisplay
public static bool StartableIn(Trainset trainset, SimulatorSettings settings) =>
settings.AdvancedSettings || (!IsAi(trainset) && !trainset.Decor);
/// <summary>
/// Whether the crew of the consist being edited may be changed: in the standard mode
/// only in one the player may start in - the simulator's own consists and the
/// decorations keep the crew the scenario gave them.
/// </summary>
public static bool CrewEditableIn(Trainset? trainset, SimulatorSettings settings) =>
trainset is null || StartableIn(trainset, settings);
/// <summary>The consist's row in those lists: what it is made of, or the track of one with nothing on it.</summary>
public static string ListLabel(Trainset trainset) =>
CompositionText(trainset) ?? string.Format(App.Loc["EmptyTrainset"], trainset.Track ?? "");
+159
View File
@@ -0,0 +1,159 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
namespace StarterNG.Infrastructure;
/// <summary>What the simulator's OpenAL library offers for its sound settings.</summary>
public sealed record AudioChoices(IReadOnlyList<string> Devices, IReadOnlyList<string> HrtfProfiles, IReadOnlyList<string> Resamplers)
{
public static AudioChoices None { get; } = new(Array.Empty<string>(), Array.Empty<string>(), Array.Empty<string>());
}
/// <summary>
/// Asks the OpenAL library beside the simulator, the one it plays through, for the output devices,
/// the HRTF data sets and the resamplers. The data sets and the resamplers are known only with a
/// device open, so the default one is opened for a moment. An older library (OpenAL Soft before
/// 1.19 lists no resamplers), or none at all, gives what it can and empty lists for the rest.
/// </summary>
public static unsafe class OpenAlProbe
{
private const int AlcDeviceSpecifier = 0x1005;
private const int AlcAllDevicesSpecifier = 0x1013;
private const int AlcNumHrtfSpecifiers = 0x1994;
private const int AlcHrtfSpecifier = 0x1995;
private const int AlNumResamplers = 0x1210;
private const int AlResamplerName = 0x1213;
/// <summary>The file of the library in the simulator's folder.</summary>
public static string LibraryFile => OperatingSystem.IsWindows() ? "OpenAL32.dll" : "libopenal.so.1";
public static AudioChoices Read(string gameFolder)
{
// The library stays loaded: OpenAL Soft keeps threads of its own, unloading it under them is not safe.
if (!NativeLibrary.TryLoad(Path.Combine(gameFolder, LibraryFile), out IntPtr library))
return AudioChoices.None;
try
{
return new Api(library).Read();
}
catch (EntryPointNotFoundException)
{
return AudioChoices.None;
}
}
/// <summary>The entry points of one library; the extension ones are null where it lacks them.</summary>
private sealed class Api
{
private readonly delegate* unmanaged[Cdecl]<IntPtr, byte*, byte> _alcIsExtensionPresent;
private readonly delegate* unmanaged[Cdecl]<IntPtr, int, byte*> _alcGetString;
private readonly delegate* unmanaged[Cdecl]<byte*, IntPtr> _alcOpenDevice;
private readonly delegate* unmanaged[Cdecl]<IntPtr, byte> _alcCloseDevice;
private readonly delegate* unmanaged[Cdecl]<IntPtr, int*, IntPtr> _alcCreateContext;
private readonly delegate* unmanaged[Cdecl]<IntPtr, byte> _alcMakeContextCurrent;
private readonly delegate* unmanaged[Cdecl]<IntPtr, void> _alcDestroyContext;
private readonly delegate* unmanaged[Cdecl]<IntPtr, int, int, int*, void> _alcGetIntegerv;
private readonly delegate* unmanaged[Cdecl]<int, int> _alGetInteger;
private readonly delegate* unmanaged[Cdecl]<IntPtr, int, int, byte*> _alcGetStringiSOFT;
private readonly delegate* unmanaged[Cdecl]<int, int, byte*> _alGetStringiSOFT;
public Api(IntPtr library)
{
_alcIsExtensionPresent = (delegate* unmanaged[Cdecl]<IntPtr, byte*, byte>)NativeLibrary.GetExport(library, "alcIsExtensionPresent");
_alcGetString = (delegate* unmanaged[Cdecl]<IntPtr, int, byte*>)NativeLibrary.GetExport(library, "alcGetString");
_alcOpenDevice = (delegate* unmanaged[Cdecl]<byte*, IntPtr>)NativeLibrary.GetExport(library, "alcOpenDevice");
_alcCloseDevice = (delegate* unmanaged[Cdecl]<IntPtr, byte>)NativeLibrary.GetExport(library, "alcCloseDevice");
_alcCreateContext = (delegate* unmanaged[Cdecl]<IntPtr, int*, IntPtr>)NativeLibrary.GetExport(library, "alcCreateContext");
_alcMakeContextCurrent = (delegate* unmanaged[Cdecl]<IntPtr, byte>)NativeLibrary.GetExport(library, "alcMakeContextCurrent");
_alcDestroyContext = (delegate* unmanaged[Cdecl]<IntPtr, void>)NativeLibrary.GetExport(library, "alcDestroyContext");
_alcGetIntegerv = (delegate* unmanaged[Cdecl]<IntPtr, int, int, int*, void>)NativeLibrary.GetExport(library, "alcGetIntegerv");
_alGetInteger = (delegate* unmanaged[Cdecl]<int, int>)NativeLibrary.GetExport(library, "alGetInteger");
// OpenAL Soft exports its extension functions too; a library without them leaves these null.
NativeLibrary.TryGetExport(library, "alcGetStringiSOFT", out IntPtr getStringi);
_alcGetStringiSOFT = (delegate* unmanaged[Cdecl]<IntPtr, int, int, byte*>)getStringi;
NativeLibrary.TryGetExport(library, "alGetStringiSOFT", out IntPtr alGetStringi);
_alGetStringiSOFT = (delegate* unmanaged[Cdecl]<int, int, byte*>)alGetStringi;
}
public AudioChoices Read()
{
int deviceList = HasExtension("ALC_ENUMERATE_ALL_EXT\0"u8) ? AlcAllDevicesSpecifier : AlcDeviceSpecifier;
List<string> devices = NameList(_alcGetString(IntPtr.Zero, deviceList));
IntPtr device = _alcOpenDevice(null);
if (device == IntPtr.Zero)
return new AudioChoices(devices, Array.Empty<string>(), Array.Empty<string>());
try
{
return new AudioChoices(devices, HrtfProfiles(device), Resamplers(device));
}
finally
{
_alcCloseDevice(device);
}
}
private bool HasExtension(ReadOnlySpan<byte> name)
{
fixed (byte* text = name)
return _alcIsExtensionPresent(IntPtr.Zero, text) != 0;
}
private List<string> HrtfProfiles(IntPtr device)
{
var names = new List<string>();
if (_alcGetStringiSOFT == null)
return names;
int count = 0;
_alcGetIntegerv(device, AlcNumHrtfSpecifiers, 1, &count);
for (int index = 0; index < count; index++)
names.Add(Utf8(_alcGetStringiSOFT(device, AlcHrtfSpecifier, index)));
return names;
}
private List<string> Resamplers(IntPtr device)
{
var names = new List<string>();
if (_alGetStringiSOFT == null)
return names;
IntPtr context = _alcCreateContext(device, null);
if (context == IntPtr.Zero)
return names;
try
{
_alcMakeContextCurrent(context);
int count = _alGetInteger(AlNumResamplers);
for (int index = 0; index < count; index++)
names.Add(Utf8(_alGetStringiSOFT(AlResamplerName, index)));
}
finally
{
_alcMakeContextCurrent(IntPtr.Zero);
_alcDestroyContext(context);
}
return names;
}
}
private static string Utf8(byte* text) => text == null ? "" : Marshal.PtrToStringUTF8((IntPtr)text) ?? "";
/// <summary>A list of null-terminated names ending with an empty one, as OpenAL gives the devices.</summary>
private static List<string> NameList(byte* list)
{
var names = new List<string>();
if (list == null)
return names;
while (*list != 0)
{
int length = 0;
while (list[length] != 0)
length++;
names.Add(Encoding.UTF8.GetString(list, length));
list += length + 1;
}
return names;
}
}
@@ -286,11 +286,7 @@ public sealed class SceneryParser
if (numbers.Count >= 6 &&
double.TryParse(numbers[^1], NumberStyles.Float, CultureInfo.InvariantCulture, out double overcast))
{
// The simulator draws a negative overcast anew each run, from 0 up to its size.
weather.OvercastRandom = overcast < 0;
weather.Overcast = Math.Max(overcast, 0);
}
weather.Overcast = overcast;
}
private static string? MatchAllDirectives(string content, string letter)
@@ -155,6 +155,7 @@ public sealed class SettingsSerializer
s.VehiclesVolume = Clamp((int)Math.Round(c.GetDouble("sound.volume.vehicle", 1.0) * 100), 0, 100);
s.PositionalVolume = Clamp((int)Math.Round(c.GetDouble("sound.volume.positional", 1.0) * 100), 0, 100);
s.AmbientVolume = Clamp((int)Math.Round(c.GetDouble("sound.volume.ambient", 1.0) * 100), 0, 100);
ReadAudioDevice(c, s);
s.SkipPipeline = c.GetBool("gfx.skippipeline", false);
s.PythonScreenUpdateRate = c.Has("python.updatetime")
? Clamp(c.GetInt("python.updatetime", 200), 0, 10000)
@@ -361,6 +362,7 @@ public sealed class SettingsSerializer
c.SetDouble("sound.volume.vehicle", s.VehiclesVolume / 100.0);
c.SetDouble("sound.volume.positional", s.PositionalVolume / 100.0);
c.SetDouble("sound.volume.ambient", s.AmbientVolume / 100.0);
WriteAudioDevice(c, s);
c.SetBool("gfx.skippipeline", s.SkipPipeline);
c.SetInt("python.updatetime", s.PythonScreenUpdateRate);
@@ -411,6 +413,71 @@ public sealed class SettingsSerializer
return all;
}
// The OpenAL Soft options. The names (devices, HRTF data sets, resamplers) can hold spaces, so
// the simulator takes them in quotes.
private static void ReadAudioDevice(ConfigFile c, SimulatorSettings s)
{
s.AudioDevice = Unquoted(c.GetString("sound.openal.renderer", ""));
s.AudioOutputMode = FirstTokenOr(c, "sound.outputmode", "auto");
s.AudioHrtf = FirstTokenOr(c, "sound.hrtf", "auto");
s.AudioHrtfProfile = Unquoted(c.GetString("sound.hrtf.profile", ""));
s.AudioResampler = Unquoted(c.GetString("sound.resampler", ""));
s.AudioLimiter = FirstTokenOr(c, "sound.limiter", "auto");
s.AudioFrequency = Clamp(c.GetInt("sound.frequency", 0), 0, 192000);
s.AudioDoppler = Math.Clamp(c.GetDouble("sound.doppler", 0.25), 0.0, 10.0);
s.AudioLowpass = c.GetBool("sound.efx.lowpass", false);
s.AudioAirAbsorption = Math.Clamp(c.GetDouble("sound.efx.airabsorption", 0.0), 0.0, 10.0);
}
// A key the file lacks is written only when the value differs from the simulator's default, so
// saving with these left alone adds nothing an older simulator would not know.
private static void WriteAudioDevice(ConfigFile c, SimulatorSettings s)
{
SetName(c, "sound.openal.renderer", s.AudioDevice);
SetUnlessDefault(c, "sound.outputmode", s.AudioOutputMode, "auto");
SetUnlessDefault(c, "sound.hrtf", s.AudioHrtf, "auto");
SetName(c, "sound.hrtf.profile", s.AudioHrtfProfile);
SetName(c, "sound.resampler", s.AudioResampler);
SetUnlessDefault(c, "sound.limiter", s.AudioLimiter, "auto");
if (c.Has("sound.frequency") || s.AudioFrequency != 0) c.SetInt("sound.frequency", s.AudioFrequency);
if (c.Has("sound.doppler") || Math.Abs(s.AudioDoppler - 0.25) > 1e-9) c.SetDouble("sound.doppler", s.AudioDoppler);
if (c.Has("sound.efx.lowpass") || s.AudioLowpass) c.SetBool("sound.efx.lowpass", s.AudioLowpass);
if (c.Has("sound.efx.airabsorption") || s.AudioAirAbsorption != 0.0) c.SetDouble("sound.efx.airabsorption", s.AudioAirAbsorption);
}
private static void SetUnlessDefault(ConfigFile c, string key, string value, string fallback)
{
if (c.Has(key) || value != fallback)
c.Set(key, value);
}
// An empty name is the library's choice: the line goes, rather than staying with a name in it.
private static void SetName(ConfigFile c, string key, string name)
{
if (name.Length > 0)
c.Set(key, name.Contains(' ') ? $"\"{name}\"" : name);
else if (c.Has(key))
c.Remove(key);
}
private static string Unquoted(string value)
{
value = value.Trim();
return value.Length >= 2 && value[0] == '"' && value[^1] == '"' ? value[1..^1] : value;
}
private static string FirstTokenOr(ConfigFile c, string key, string fallback)
{
string token = FirstToken(c, key);
return token.Length > 0 ? token : fallback;
}
private static string FirstToken(ConfigFile c, string key)
{
var tokens = c.GetTokens(key);
return tokens.Length > 0 ? tokens[0].ToLowerInvariant() : string.Empty;
}
private static int ReadBufferScale(ConfigFile c) =>
Clamp(BufferScaleIn(c), 25, GraphicsRules.MaxBufferScale);
+4 -14
View File
@@ -6,15 +6,8 @@ using Avalonia;
namespace StarterNG.Infrastructure;
/// <summary>
/// On Windows the processor draws the starter's windows, and each frame is copied into its window
/// by GDI. Every way of the graphics card's failed on some machine: Avalonia's WinUI composition
/// visual left windows black on Windows 11 25H2, the Steam overlay drew its frame counter over a
/// window's own swap chain, and with DirectComposition the starter vanished a few seconds after its
/// window came up on a Windows 10 machine with a GTX 1650, without a word in its log. A frame copied
/// by GDI has no swap chain for an overlay to hook, and lists, text and pictures are no work for the
/// processor.
/// On X11 the graphics card draws, unless <see cref="Switch"/> asks the processor, for a machine on
/// which the window comes up empty. Each platform reads only its own options.
/// Drawn by the processor instead of the graphics card, for a machine on which the
/// window comes up empty. Each platform reads only its own options, so both are given.
/// </summary>
public static class SoftwareRender
{
@@ -34,9 +27,6 @@ public static class SoftwareRender
RenderingMode = new[] { X11RenderingMode.Software }
};
public static AppBuilder ApplyTo(AppBuilder builder, IEnumerable<string> args)
{
builder.With(Win32Options);
return AskedIn(args) ? builder.With(X11Options) : builder;
}
public static AppBuilder ApplyTo(AppBuilder builder) =>
builder.With(Win32Options).With(X11Options);
}
@@ -0,0 +1,32 @@
using Avalonia;
namespace StarterNG.Infrastructure;
/// <summary>
/// On Windows the graphics card draws each window of the starter into a DirectComposition
/// surface, not into Avalonia's default WinUI composition visual. On Windows 11 25H2 that
/// visual was left empty on many starts: the main window, or a dialog opened later,
/// stayed black while the others drew, and came back only now and then.
/// The window's own redirection surface is only the fallback: there ANGLE draws through a
/// swap chain of the window, and the Steam overlay, which Steam puts into the starter as
/// the game it launches, hooks that swap chain's Present and draws its frame counter and
/// notifications over the starter. A composition surface is drawn without a Present.
/// </summary>
public static class WindowSurfaces
{
public static Win32PlatformOptions Win32Options => new()
{
CompositionMode = new[]
{
Win32CompositionMode.DirectComposition,
Win32CompositionMode.RedirectionSurface
}
};
/// <summary>
/// The options a platform reads are the last given, so the processor, when asked
/// for, draws with <see cref="SoftwareRender"/>'s own and these are left out.
/// </summary>
public static AppBuilder ApplyTo(AppBuilder builder, bool softwareRender) =>
softwareRender ? SoftwareRender.ApplyTo(builder) : builder.With(Win32Options);
}
+13 -3
View File
@@ -701,10 +701,20 @@ public partial class MainWindow : Window
}
/// <summary>
/// The scenery editor on the selected scenery; with none selected, the
/// simulator's wizard makes a new one.
/// The scenery editor, which only some simulator builds have - said up front,
/// since one without it simply does not open it, and it writes to the scenery
/// itself. With none selected there is nothing to write to: the simulator's
/// wizard makes a new one.
/// </summary>
private Task LaunchEditorAsync() => FollowStartAsync(AppServices.Current.StartSimulation.ExecuteEditor);
private async Task LaunchEditorAsync()
{
if (AppServices.Current.State.CurrentScenery is { } scenery &&
!await MessageBox.Show(this, string.Format(App.Loc["StartEditorWarning"], Path.GetFileName(scenery.Path)),
App.Loc["StartEditor"], MessageBoxButtons.YesNo))
return;
await FollowStartAsync(AppServices.Current.StartSimulation.ExecuteEditor);
}
/// <summary>Reports a start that failed, or steps aside for the simulator that started.</summary>
/// <param name="start">The start, run again once what stopped it is put right.</param>
+6 -7
View File
@@ -10,8 +10,7 @@ namespace StarterNG;
static class Program
{
// What --software-render is looked for in; none for the designer, which calls BuildAvaloniaApp itself.
private static string[] _args = Array.Empty<string>();
private static bool _softwareRender;
[STAThread]
public static void Main(string[] args)
@@ -20,7 +19,7 @@ static class Program
var graphics = SystemGraphicsLibraries.TakeOnWindows();
graphics?.ServeTo(typeof(Win32PlatformOptions).Assembly);
_args = args;
_softwareRender = SoftwareRender.AskedIn(args);
// Composition root first: everything below, including the crash handlers,
// resolves its collaborators from this graph.
@@ -74,14 +73,14 @@ static class Program
};
}
// On Windows the processor draws; on X11 the graphics card, unless --software-render.
private static AppBuilder WithSoftwareRender(this AppBuilder builder) =>
SoftwareRender.ApplyTo(builder, _args);
// Without the switch the graphics card draws, into the window surfaces.
private static AppBuilder WithSoftwareRenderIfAsked(this AppBuilder builder) =>
WindowSurfaces.ApplyTo(builder, _softwareRender);
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.WithSoftwareRender()
.WithSoftwareRenderIfAsked()
.WithInterFont()
.WithDiagnosticsLogging()
.AfterSetup(_ => LogUiExceptions());
+2
View File
@@ -6,6 +6,8 @@
<IsAotCompatible>true</IsAotCompatible>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<!-- function pointers into the OpenAL library of the simulator (Infrastructure/OpenAlProbe.cs) -->
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<!-- DXGI is asked through function pointers, which NativeAOT compiles without reflection. -->
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+1 -1
View File
@@ -69,7 +69,7 @@ public partial class Depot : UserControl
if (Design.IsDesignMode)
return;
// The standard mode lists other consists and leaves the crew of the simulator's own alone.
// The standard mode lists other consists and leaves the crew alone.
Settings.AdvancedModeChanged += () =>
{
PopulateSceneryConsists();
+3 -6
View File
@@ -49,9 +49,6 @@ public sealed class VehicleCards
public Dynamic? PressedCar { get; set; }
private bool CrewEditable =>
TrainsetDisplay.CrewEditableIn(_consist.EditingTrainset, AppServices.Current.Settings);
public VehicleCards(Panel consistStack, VehicleCatalog db, Consist consist,
Cargo cargo, MiniTextures minis, Cursor hand,
Action redraw, Action refreshDetails, Action<Dynamic> selectInBrowser,
@@ -120,8 +117,8 @@ public sealed class VehicleCards
HorizontalAlignment = HorizontalAlignment.Center,
Margin = new Thickness(0, 1, 0, 2)
};
// Who sits in the cab; in the standard mode not in the simulator's own consists.
if (CrewEditable)
// Who sits in the cab - the player, the simulator, a passenger or nobody - is for the advanced mode.
if (AppServices.Current.Settings.AdvancedSettings)
controls.Children.Add(DriverButton(item));
controls.Children.Add(FlipButton(item));
@@ -698,7 +695,7 @@ public sealed class VehicleCards
else if (_consist.CanJoin(item, index))
menu.AddItem(App.Loc["TipJoin"], () => _consist.Join(item));
if (CrewEditable)
if (AppServices.Current.Settings.AdvancedSettings)
{
var crew = new MenuItem { Header = App.Loc["CrewLabel"] };
foreach (var (type, key) in CrewChoices.All)
+2 -2
View File
@@ -280,8 +280,8 @@ public sealed class VehicleDetails
};
driver.MinWidth = 0;
driver.HorizontalAlignment = HorizontalAlignment.Stretch;
// Shown but not changed in the standard mode in the simulator's own consists.
driver.IsEnabled = TrainsetDisplay.CrewEditableIn(_consist.EditingTrainset, AppServices.Current.Settings);
// Shown but not changed in the standard mode: who drives is for the advanced one.
driver.IsEnabled = AppServices.Current.Settings.AdvancedSettings;
var rows = new StackPanel();
rows.Children.Add(Row(App.Loc["CrewLabel"], driver));
+5 -4
View File
@@ -189,12 +189,13 @@
HorizontalAlignment="Stretch"
SelectionChanged="Weather_OnSelectionChanged">
<ComboBoxItem Tag="random" Content="{Binding [OvercastRandom], Source={x:Static starterNg:App.Loc}}" />
<ComboBoxItem Tag="0" Content="{Binding [OvercastClear], Source={x:Static starterNg:App.Loc}}" />
<ComboBoxItem Tag="-1.5" Content="{Binding [OvercastClear], Source={x:Static starterNg:App.Loc}}" />
<ComboBoxItem Tag="0" Content="{Binding [OvercastFair], Source={x:Static starterNg:App.Loc}}" />
<ComboBoxItem Tag="0.3" Content="{Binding [OvercastLight], Source={x:Static starterNg:App.Loc}}" />
<ComboBoxItem Tag="0.7" Content="{Binding [OvercastModerate], Source={x:Static starterNg:App.Loc}}" />
<ComboBoxItem Tag="1" Content="{Binding [OvercastCloudy], Source={x:Static starterNg:App.Loc}}" />
<ctl:PrecipitationItem Tag="1.1" Name="weatherPrecipitationLight" />
<ctl:PrecipitationItem Tag="1.5" Name="weatherPrecipitation" Heavy="True" />
<ComboBoxItem Tag="1" Content="{Binding [OvercastHeavy], Source={x:Static starterNg:App.Loc}}" />
<ComboBoxItem Tag="1.1" Content="{Binding [OvercastCloudy], Source={x:Static starterNg:App.Loc}}" />
<ComboBoxItem Tag="1.5" Content="{Binding [OvercastStorm], Source={x:Static starterNg:App.Loc}}" />
</ComboBox>
<Border Grid.Row="11" Grid.Column="0" Grid.ColumnSpan="5"
-1
View File
@@ -831,7 +831,6 @@ public partial class Scenarios : UserControl
weatherTemp.ValueText = weatherTempLabel.Text;
weatherFog.ValueText = weatherFogLabel.Text;
weatherDayDate.Text = string.Format(LanguageCulture, App.Loc["DayOfYear"], SelectedDayOfYear());
weatherPrecipitationLight.Snow = weatherPrecipitation.Snow = SceneryWeather.Snows(weatherTemp.Value);
weatherRestore.IsEnabled = _currentScenery?.Weather.Changed ?? false;
}
+87
View File
@@ -0,0 +1,87 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Avalonia.Controls;
using StarterNG.Application;
using StarterNG.Domain.Settings;
using StarterNG.Infrastructure;
using StarterNG.Infrastructure.Adapters;
namespace StarterNG.Views;
// The OpenAL Soft options of the sound category. The lists of devices, HRTF data sets and
// resamplers come from the simulator's own OpenAL library, read in the background; until then,
// and where the library cannot say, a list holds the library's choice and the value of the file.
public partial class Settings
{
// eu07.ini is written in code page 1250: a name it cannot hold (a device named in Cyrillic, say)
// would reach the simulator as question marks, so such a name is not offered.
private static readonly Encoding StrictCodePage1250 =
Encoding.GetEncoding(LegacyText.CodePage1250.CodePage, EncoderFallback.ExceptionFallback, DecoderFallback.ExceptionFallback);
private async void ReadAudioChoices()
{
string root = AppServices.Current.Paths.Root;
AudioChoices choices = await Task.Run(() => OpenAlProbe.Read(root));
// Adding items leaves the selection alone, so this marks nothing as changed.
AddNames(AudioDeviceCb, choices.Devices, FitsTheFile);
// The simulator finds a device named in code page 1250 too, but an HRTF data set or a
// resampler only by the library's own spelling, so of those only plain ASCII is offered.
AddNames(AudioHrtfProfileCb, choices.HrtfProfiles, PlainAscii);
AddNames(AudioResamplerCb, choices.Resamplers, PlainAscii);
}
private static void AddNames(ComboBox cb, IReadOnlyList<string> names, Func<string, bool> offered)
{
foreach (string name in names)
if (name.Length > 0 && offered(name) && IndexOfTag(cb, name) < 0)
cb.Items.Add(new ComboBoxItem { Tag = name, Content = name });
}
private static bool PlainAscii(string name) => Ascii.IsValid(name);
private static bool FitsTheFile(string name)
{
try
{
StrictCodePage1250.GetByteCount(name);
return true;
}
catch (EncoderFallbackException)
{
return false;
}
}
private void ShowSound(SimulatorSettings s)
{
SelectOrAddTag(AudioDeviceCb, s.AudioDevice, s.AudioDevice);
SelectOrAddTag(AudioOutputModeCb, s.AudioOutputMode, s.AudioOutputMode);
SelectOrAddTag(AudioHrtfCb, s.AudioHrtf, s.AudioHrtf);
SelectOrAddTag(AudioHrtfProfileCb, s.AudioHrtfProfile, s.AudioHrtfProfile);
SelectOrAddTag(AudioResamplerCb, s.AudioResampler, s.AudioResampler);
SelectOrAddTag(AudioLimiterCb, s.AudioLimiter, s.AudioLimiter);
string frequency = s.AudioFrequency.ToString(Invariant);
SelectOrAddTag(AudioFrequencyCb, frequency, frequency + " Hz");
AudioDopplerSlider.Value = s.AudioDoppler;
AudioLowpassCb.IsChecked = s.AudioLowpass;
AudioAirAbsorptionSlider.Value = s.AudioAirAbsorption;
}
private void CaptureSound(SimulatorSettings s)
{
s.AudioDevice = SelectedTag(AudioDeviceCb) ?? "";
s.AudioOutputMode = SelectedTag(AudioOutputModeCb) ?? "auto";
s.AudioHrtf = SelectedTag(AudioHrtfCb) ?? "auto";
s.AudioHrtfProfile = SelectedTag(AudioHrtfProfileCb) ?? "";
s.AudioResampler = SelectedTag(AudioResamplerCb) ?? "";
s.AudioLimiter = SelectedTag(AudioLimiterCb) ?? "auto";
s.AudioFrequency = TagInt(AudioFrequencyCb, 0);
// A value the slider can't show (past its end, between its ticks) is kept by the
// shown-unlike bookkeeping of the page until the slider is moved.
s.AudioDoppler = AudioDopplerSlider.Value;
s.AudioLowpass = IsChecked(AudioLowpassCb);
s.AudioAirAbsorption = AudioAirAbsorptionSlider.Value;
}
}
+85
View File
@@ -357,6 +357,47 @@
</ctl:SettingRow>
</StackPanel>
</ctl:SettingsSection>
<ctl:SettingsSection Header="{Binding [SoundDevice], Source={x:Static starterNg:App.Loc}}">
<StackPanel IsEnabled="{Binding #EnableSoundsCb.IsChecked}">
<ctl:SettingRow ConfigKey="sound.openal.renderer" Label="{Binding [SoundOutputDevice], Source={x:Static starterNg:App.Loc}}"
Description="{Binding [SoundOutputDeviceDesc], Source={x:Static starterNg:App.Loc}}">
<ComboBox x:Name="AudioDeviceCb" HorizontalAlignment="Stretch">
<ComboBoxItem Tag="" Content="{Binding [SoundSystemDefault], Source={x:Static starterNg:App.Loc}}" />
</ComboBox>
</ctl:SettingRow>
<ctl:SettingRow ConfigKey="sound.outputmode" Label="{Binding [SoundOutputMode], Source={x:Static starterNg:App.Loc}}"
Description="{Binding [SoundOutputModeDesc], Source={x:Static starterNg:App.Loc}}">
<ComboBox x:Name="AudioOutputModeCb" Classes="Localized" SelectedIndex="0">
<ComboBoxItem Tag="auto" Content="{Binding [SoundAutomatic], Source={x:Static starterNg:App.Loc}}" />
<ComboBoxItem Tag="mono" Content="Mono" />
<ComboBoxItem Tag="stereo" Content="Stereo" />
<ComboBoxItem Tag="stereo-basic" Content="{Binding [SoundStereoBasic], Source={x:Static starterNg:App.Loc}}" />
<ComboBoxItem Tag="uhj" Content="{Binding [SoundStereoUhj], Source={x:Static starterNg:App.Loc}}" />
<ComboBoxItem Tag="headphones" Content="{Binding [SoundHeadphones], Source={x:Static starterNg:App.Loc}}" />
<ComboBoxItem Tag="quad" Content="Quad" />
<ComboBoxItem Tag="5.1" Content="5.1" />
<ComboBoxItem Tag="6.1" Content="6.1" />
<ComboBoxItem Tag="7.1" Content="7.1" />
</ComboBox>
</ctl:SettingRow>
<ctl:SettingRow ConfigKey="sound.doppler" Label="{Binding [SoundDoppler], Source={x:Static starterNg:App.Loc}}"
Description="{Binding [SoundDopplerDesc], Source={x:Static starterNg:App.Loc}}"
ValueText="{Binding #AudioDopplerSlider.Value, StringFormat='{}{0:0.00}'}">
<ctl:ReadableSlider x:Name="AudioDopplerSlider" Minimum="0" Maximum="1" TickFrequency="0.05"
IsSnapToTickEnabled="True" Value="0.25" />
</ctl:SettingRow>
<ctl:SettingRow ConfigKey="sound.efx.lowpass" Label="{Binding [SoundLowpass], Source={x:Static starterNg:App.Loc}}"
Description="{Binding [SoundLowpassDesc], Source={x:Static starterNg:App.Loc}}">
<CheckBox x:Name="AudioLowpassCb" />
</ctl:SettingRow>
<ctl:SettingRow ConfigKey="sound.efx.airabsorption" Label="{Binding [SoundAirAbsorption], Source={x:Static starterNg:App.Loc}}"
Description="{Binding [SoundAirAbsorptionDesc], Source={x:Static starterNg:App.Loc}}"
ValueText="{Binding #AudioAirAbsorptionSlider.Value, StringFormat='{}{0:0.0}'}">
<ctl:ReadableSlider x:Name="AudioAirAbsorptionSlider" Minimum="0" Maximum="10" TickFrequency="0.5"
IsSnapToTickEnabled="True" Value="0" />
</ctl:SettingRow>
</StackPanel>
</ctl:SettingsSection>
</StackPanel>
<!-- ============================ PHYSICS ============================ -->
@@ -767,6 +808,50 @@
</StackPanel>
</ctl:SettingsSection>
<ctl:SettingsSection Advanced="True" Header="{Binding [Sounds], Source={x:Static starterNg:App.Loc}}">
<StackPanel IsEnabled="{Binding #EnableSoundsCb.IsChecked}">
<ctl:SettingRow ConfigKey="sound.hrtf" Label="HRTF"
Description="{Binding [SoundHrtfDesc], Source={x:Static starterNg:App.Loc}}">
<ComboBox x:Name="AudioHrtfCb" Classes="Localized" SelectedIndex="0">
<ComboBoxItem Tag="auto" Content="{Binding [SoundAutomatic], Source={x:Static starterNg:App.Loc}}" />
<ComboBoxItem Tag="on" Content="{Binding [SoundOn], Source={x:Static starterNg:App.Loc}}" />
<ComboBoxItem Tag="off" Content="{Binding [SoundOff], Source={x:Static starterNg:App.Loc}}" />
</ComboBox>
</ctl:SettingRow>
<ctl:SettingRow ConfigKey="sound.hrtf.profile" Label="{Binding [SoundHrtfProfile], Source={x:Static starterNg:App.Loc}}"
Description="{Binding [SoundHrtfProfileDesc], Source={x:Static starterNg:App.Loc}}">
<ComboBox x:Name="AudioHrtfProfileCb" HorizontalAlignment="Stretch">
<ComboBoxItem Tag="" Content="{Binding [SoundLibraryChoice], Source={x:Static starterNg:App.Loc}}" />
</ComboBox>
</ctl:SettingRow>
<ctl:SettingRow ConfigKey="sound.resampler" Label="{Binding [SoundResampler], Source={x:Static starterNg:App.Loc}}"
Description="{Binding [SoundResamplerDesc], Source={x:Static starterNg:App.Loc}}">
<ComboBox x:Name="AudioResamplerCb" HorizontalAlignment="Stretch">
<ComboBoxItem Tag="" Content="{Binding [SoundLibraryDefault], Source={x:Static starterNg:App.Loc}}" />
</ComboBox>
</ctl:SettingRow>
<ctl:SettingRow ConfigKey="sound.limiter" Label="{Binding [SoundLimiter], Source={x:Static starterNg:App.Loc}}"
Description="{Binding [SoundLimiterDesc], Source={x:Static starterNg:App.Loc}}">
<ComboBox x:Name="AudioLimiterCb" Classes="Localized" SelectedIndex="0">
<ComboBoxItem Tag="auto" Content="{Binding [SoundAutomatic], Source={x:Static starterNg:App.Loc}}" />
<ComboBoxItem Tag="on" Content="{Binding [SoundOn], Source={x:Static starterNg:App.Loc}}" />
<ComboBoxItem Tag="off" Content="{Binding [SoundOff], Source={x:Static starterNg:App.Loc}}" />
</ComboBox>
</ctl:SettingRow>
<ctl:SettingRow ConfigKey="sound.frequency" Label="{Binding [SoundFrequency], Source={x:Static starterNg:App.Loc}}"
Description="{Binding [SoundFrequencyDesc], Source={x:Static starterNg:App.Loc}}">
<ComboBox x:Name="AudioFrequencyCb" Classes="Localized" SelectedIndex="0">
<ComboBoxItem Tag="0" Content="{Binding [SoundDeviceRate], Source={x:Static starterNg:App.Loc}}" />
<ComboBoxItem Tag="22050" Content="22050 Hz" />
<ComboBoxItem Tag="32000" Content="32000 Hz" />
<ComboBoxItem Tag="44100" Content="44100 Hz" />
<ComboBoxItem Tag="48000" Content="48000 Hz" />
<ComboBoxItem Tag="96000" Content="96000 Hz" />
</ComboBox>
</ctl:SettingRow>
</StackPanel>
</ctl:SettingsSection>
<ctl:SettingsSection Advanced="True" Header="{Binding [DevSimulation], Source={x:Static starterNg:App.Loc}}">
<StackPanel>
<ctl:SettingRow ConfigKey="fullphysics" Description="{Binding [PhysicsAccuracyIncreasedDesc], Source={x:Static starterNg:App.Loc}}">
+3
View File
@@ -104,6 +104,7 @@ public partial class Settings : UserControl, ISettingsCapture
BuildPhysicsPresets();
BuildMonitorRates();
ReadGraphicsCards();
ReadAudioChoices();
App.Loc.LanguageChanged += UpdateCardText;
App.Loc.LanguageChanged += _keyRows.UpdateTexts;
@@ -463,6 +464,7 @@ public partial class Settings : UserControl, ISettingsCapture
LogMissingVehicleFilesCb.IsChecked = s.LogMissingVehicleFiles;
ShowGraphics(s);
ShowSound(s);
GpuCb.SelectedIndex = s.Gpu == GpuPreference.System ? 1 : 0;
SelectResolution(s.Width, s.Height);
bufferScale.Value = s.BufferScalePercent;
@@ -1057,6 +1059,7 @@ public partial class Settings : UserControl, ISettingsCapture
s.LogMissingVehicleFiles = IsChecked(LogMissingVehicleFilesCb);
CaptureGraphics(s);
CaptureSound(s);
if (!ShowsFileValue(GpuCb)) s.Gpu = SelectedGpu();
ReadResolution(s);
s.BufferScalePercent = (int)bufferScale.Value;
+25 -5
View File
@@ -48,13 +48,12 @@
<String key="SeasonWinter">Zima</String>
<String key="OvercastRandom">Náhodné</String>
<String key="OvercastClear">Jasno</String>
<String key="OvercastFair">Skoro jasno</String>
<String key="OvercastLight">Slabá oblačnost</String>
<String key="OvercastModerate">Mírná oblačnost</String>
<String key="OvercastHeavy">Silná oblačnost</String>
<String key="OvercastCloudy">Zataženo</String>
<String key="OvercastRainLight">Slabý déšť</String>
<String key="OvercastRain">Déšť</String>
<String key="OvercastSnowLight">Slabé sněžení</String>
<String key="OvercastSnow">Sněžení</String>
<String key="OvercastStorm">Bouřka</String>
<String key="WeatherDateTime">Datum a čas</String>
<String key="WeatherConditions">Povětrnostní podmínky</String>
<String key="Consist">Souprava</String>
@@ -526,6 +525,26 @@
<String key="VehiclesVolume">Hlasitost vozidel</String>
<String key="PositionedSoundsVolume">Hlasitost prostorových zvuků</String>
<String key="AmbientVolume">Hlasitost okolí</String>
<String key="SoundDevice">Zvukové zařízení a efekty</String>
<String key="SoundOutputDevice">Výstupní zařízení</String>
<String key="SoundSystemDefault">Výchozí systémové</String>
<String key="SoundOutputMode">Rozložení reproduktorů</String>
<String key="SoundAutomatic">Automaticky</String>
<String key="SoundStereoBasic">Stereo (jednoduché panorama)</String>
<String key="SoundStereoUhj">Stereo (UHJ, širší)</String>
<String key="SoundHeadphones">Sluchátka (HRTF)</String>
<String key="SoundOn">Zapnuto</String>
<String key="SoundOff">Vypnuto</String>
<String key="SoundHrtfProfile">Sada dat HRTF</String>
<String key="SoundLibraryChoice">Volba knihovny</String>
<String key="SoundResampler">Převzorkování</String>
<String key="SoundLibraryDefault">Výchozí knihovny</String>
<String key="SoundLimiter">Omezovač výstupu</String>
<String key="SoundFrequency">Vzorkovací frekvence mixu</String>
<String key="SoundDeviceRate">Frekvence zařízení</String>
<String key="SoundDoppler">Dopplerův jev</String>
<String key="SoundLowpass">Tlumené zvuky mimo kabinu</String>
<String key="SoundAirAbsorption">Pohlcování vzduchem</String>
<String key="Advanced">Pokročilé</String>
<String key="AdvancedMode">Pokročilý režim</String>
@@ -697,8 +716,9 @@
<String key="StartFreeFly">Spustit bez vozidla</String>
<String key="StartEditorShort">Editor scenérie</String>
<String key="StartEditorWizard">Vytvořit novou scenérii</String>
<String key="StartEditorWizardTip">Průvodce novou scenérií v editoru simulátoru.</String>
<String key="StartEditorWizardTip">Průvodce novou scenérií v editoru simulátoru. Editor mají jen některé verze.</String>
<String key="StartEditor">Spustit editor scenérie</String>
<String key="StartEditorWarning">Editor scenérie (eu07 -edit) mají jen některé verze simulátoru. Pokud ho vybraný simulátor nepodporuje, editor se neotevře. Editor pracuje přímo se souborem {0}, ne s kopií od starteru, takže uložené změny se zapíší do scenérie. Spustit?</String>
<String key="DebugLogVisible">Zobrazovat průběh simulace</String>
<String key="PyScreenPriority">Frekvence obnovení doplňkových obrazovek</String>
<String key="PyPriorityNormal">Standardní</String>
+35 -5
View File
@@ -48,13 +48,12 @@
<String key="SeasonWinter">Winter</String>
<String key="OvercastRandom">Random</String>
<String key="OvercastClear">Clear</String>
<String key="OvercastFair">Fair</String>
<String key="OvercastLight">Light clouds</String>
<String key="OvercastModerate">Moderate clouds</String>
<String key="OvercastHeavy">Heavy clouds</String>
<String key="OvercastCloudy">Cloudy</String>
<String key="OvercastRainLight">Light rain</String>
<String key="OvercastRain">Rain</String>
<String key="OvercastSnowLight">Light snow</String>
<String key="OvercastSnow">Snow</String>
<String key="OvercastStorm">Storm</String>
<String key="WeatherDateTime">Date and time</String>
<String key="WeatherConditions">Conditions</String>
<String key="Consist">Consist</String>
@@ -552,6 +551,36 @@
<String key="VehiclesVolume">Vehicles</String>
<String key="PositionedSoundsVolume">Positional sounds</String>
<String key="AmbientVolume">Ambient</String>
<String key="SoundDevice">Sound device and effects</String>
<String key="SoundOutputDevice">Output device</String>
<String key="SoundOutputDeviceDesc">System default follows the device chosen in the system, also during the game.</String>
<String key="SoundSystemDefault">System default</String>
<String key="SoundOutputMode">Speaker layout</String>
<String key="SoundOutputModeDesc">Headphones, stereo speakers or surround. Automatic takes what the device reports.</String>
<String key="SoundAutomatic">Automatic</String>
<String key="SoundStereoBasic">Stereo (simple panning)</String>
<String key="SoundStereoUhj">Stereo (UHJ, wider)</String>
<String key="SoundHeadphones">Headphones (HRTF)</String>
<String key="SoundHrtfDesc">3D sound on headphones. Automatic turns it on for headphones.</String>
<String key="SoundOn">On</String>
<String key="SoundOff">Off</String>
<String key="SoundHrtfProfile">HRTF data set</String>
<String key="SoundHrtfProfileDesc">The head model HRTF uses. Another one may suit your ears better.</String>
<String key="SoundLibraryChoice">Library's choice</String>
<String key="SoundResampler">Resampler</String>
<String key="SoundResamplerDesc">Better ones sound cleaner and take a little more processor time.</String>
<String key="SoundLibraryDefault">Library default</String>
<String key="SoundLimiter">Output limiter</String>
<String key="SoundLimiterDesc">Turns the mix down for a moment, so loud sounds don't clip.</String>
<String key="SoundFrequency">Mixing rate</String>
<String key="SoundFrequencyDesc">The device's own rate saves one conversion.</String>
<String key="SoundDeviceRate">Device rate</String>
<String key="SoundDoppler">Doppler effect</String>
<String key="SoundDopplerDesc">Pitch change of a passing vehicle. 0 – off, 1 – physical.</String>
<String key="SoundLowpass">Muffled sounds outside the cab</String>
<String key="SoundLowpassDesc">Sounds heard through the cab walls lose their high tones.</String>
<String key="SoundAirAbsorption">Air absorption</String>
<String key="SoundAirAbsorptionDesc">Distant sounds lose their high tones. 0 – off, 1 – natural.</String>
<String key="Advanced">Advanced</String>
<String key="AdvancedMode">Advanced mode</String>
@@ -723,8 +752,9 @@
<String key="StartFreeFly">Start with no vehicle</String>
<String key="StartEditorShort">Scenery editor</String>
<String key="StartEditorWizard">Create a new scenery</String>
<String key="StartEditorWizardTip">The new scenery wizard in the simulator's editor.</String>
<String key="StartEditorWizardTip">The new scenery wizard in the simulator's editor. Only some builds have the editor.</String>
<String key="StartEditor">Open the scenery editor</String>
<String key="StartEditorWarning">Only some simulator builds have the scenery editor (eu07 -edit). If the selected simulator does not, the editor will not open. It works on {0} itself, not on the starter's copy, so what you save goes into the scenery. Start it?</String>
<String key="DebugLogVisible">Log in console</String>
<String key="PyScreenPriority">Extra screens refresh</String>
<String key="PyScreenPriorityDesc">How often cab screens refresh. Less often means more FPS.</String>
+25 -5
View File
@@ -48,13 +48,12 @@
<String key="SeasonWinter">Tél</String>
<String key="OvercastRandom">Véletlenszerű</String>
<String key="OvercastClear">Derült</String>
<String key="OvercastFair">Gyengén felhős</String>
<String key="OvercastLight">Kevés felhő</String>
<String key="OvercastModerate">Közepes felhőzet</String>
<String key="OvercastHeavy">Erős felhőzet</String>
<String key="OvercastCloudy">Borult</String>
<String key="OvercastRainLight">Gyenge eső</String>
<String key="OvercastRain">Eső</String>
<String key="OvercastSnowLight">Gyenge havazás</String>
<String key="OvercastSnow">Havazás</String>
<String key="OvercastStorm">Vihar</String>
<String key="WeatherDateTime">Dátum és idő</String>
<String key="WeatherConditions">Időjárási viszonyok</String>
<String key="Consist">Szerelvény</String>
@@ -526,6 +525,26 @@
<String key="VehiclesVolume">Járművek hangereje</String>
<String key="PositionedSoundsVolume">Térbeli hangok hangereje</String>
<String key="AmbientVolume">Környezeti hangok hangereje</String>
<String key="SoundDevice">Hangeszköz és effektek</String>
<String key="SoundOutputDevice">Kimeneti eszköz</String>
<String key="SoundSystemDefault">Rendszer alapértelmezése</String>
<String key="SoundOutputMode">Hangszóró-elrendezés</String>
<String key="SoundAutomatic">Automatikus</String>
<String key="SoundStereoBasic">Sztereó (egyszerű panoráma)</String>
<String key="SoundStereoUhj">Sztereó (UHJ, szélesebb)</String>
<String key="SoundHeadphones">Fejhallgató (HRTF)</String>
<String key="SoundOn">Be</String>
<String key="SoundOff">Ki</String>
<String key="SoundHrtfProfile">HRTF-adatkészlet</String>
<String key="SoundLibraryChoice">A könyvtár választása</String>
<String key="SoundResampler">Újramintavételezés</String>
<String key="SoundLibraryDefault">A könyvtár alapértelmezése</String>
<String key="SoundLimiter">Kimeneti limiter</String>
<String key="SoundFrequency">Keverési mintavételi frekvencia</String>
<String key="SoundDeviceRate">Az eszköz frekvenciája</String>
<String key="SoundDoppler">Doppler-hatás</String>
<String key="SoundLowpass">Tompított hangok a fülkén kívülről</String>
<String key="SoundAirAbsorption">Levegő általi elnyelés</String>
<String key="Advanced">Speciális</String>
<String key="AdvancedMode">Haladó mód</String>
@@ -697,8 +716,9 @@
<String key="StartFreeFly">Indítás jármű nélkül</String>
<String key="StartEditorShort">Pályaszerkesztő</String>
<String key="StartEditorWizard">Új színtér létrehozása</String>
<String key="StartEditorWizardTip">Új színtér varázsló a szimulátor szerkesztőjében.</String>
<String key="StartEditorWizardTip">Új színtér varázsló a szimulátor szerkesztőjében. A szerkesztő csak egyes verziókban van meg.</String>
<String key="StartEditor">Pályaszerkesztő indítása</String>
<String key="StartEditorWarning">A pályaszerkesztő (eu07 -edit) csak a szimulátor egyes verzióiban érhető el. Ha a kiválasztott szimulátor nem támogatja, a szerkesztő nem nyílik meg. Közvetlenül a(z) {0} fájlon dolgozik, nem a starter másolatán, így a mentett változások a pályába kerülnek. Elindítod?</String>
<String key="DebugLogVisible">Szimuláció menetének megjelenítése</String>
<String key="PyScreenPriority">Kiegészítő képernyők frissítési gyakorisága</String>
<String key="PyPriorityNormal">Normál</String>
+35 -5
View File
@@ -48,13 +48,12 @@
<String key="SeasonWinter">Zima</String>
<String key="OvercastRandom">Losowe</String>
<String key="OvercastClear">Bezchmurnie</String>
<String key="OvercastFair">Pogodnie</String>
<String key="OvercastLight">Lekkie zachmurzenie</String>
<String key="OvercastModerate">Umiarkowane zachmurzenie</String>
<String key="OvercastHeavy">Duże zachmurzenie</String>
<String key="OvercastCloudy">Pochmurno</String>
<String key="OvercastRainLight">Lekki deszcz</String>
<String key="OvercastRain">Deszcz</String>
<String key="OvercastSnowLight">Lekki śnieg</String>
<String key="OvercastSnow">Śnieg</String>
<String key="OvercastStorm">Burza</String>
<String key="WeatherDateTime">Data i godzina</String>
<String key="WeatherConditions">Warunki atmosferyczne</String>
<String key="Consist">Zestawienie</String>
@@ -552,6 +551,36 @@
<String key="VehiclesVolume">Pojazdy</String>
<String key="PositionedSoundsVolume">Dźwięki pozycjonowane</String>
<String key="AmbientVolume">Otoczenie</String>
<String key="SoundDevice">Urządzenie i efekty dźwięku</String>
<String key="SoundOutputDevice">Urządzenie wyjściowe</String>
<String key="SoundOutputDeviceDesc">Domyślne systemowe idzie za urządzeniem wybranym w systemie, także w trakcie gry.</String>
<String key="SoundSystemDefault">Domyślne systemowe</String>
<String key="SoundOutputMode">Układ głośników</String>
<String key="SoundOutputModeDesc">Słuchawki, głośniki stereo albo dźwięk dookólny. Automatycznie – według urządzenia.</String>
<String key="SoundAutomatic">Automatycznie</String>
<String key="SoundStereoBasic">Stereo (proste panoramowanie)</String>
<String key="SoundStereoUhj">Stereo (UHJ, szersze)</String>
<String key="SoundHeadphones">Słuchawki (HRTF)</String>
<String key="SoundHrtfDesc">Dźwięk przestrzenny na słuchawkach. Automatycznie włącza się dla słuchawek.</String>
<String key="SoundOn">Włączone</String>
<String key="SoundOff">Wyłączone</String>
<String key="SoundHrtfProfile">Zestaw danych HRTF</String>
<String key="SoundHrtfProfileDesc">Model głowy, którego używa HRTF. Inny może lepiej pasować do twoich uszu.</String>
<String key="SoundLibraryChoice">Wybór biblioteki</String>
<String key="SoundResampler">Przepróbkowanie</String>
<String key="SoundResamplerDesc">Lepsze brzmią czyściej i zabierają trochę więcej czasu procesora.</String>
<String key="SoundLibraryDefault">Domyślne biblioteki</String>
<String key="SoundLimiter">Ogranicznik wyjścia</String>
<String key="SoundLimiterDesc">Na moment ścisza miks, żeby głośne dźwięki nie przesterowały.</String>
<String key="SoundFrequency">Częstotliwość miksowania</String>
<String key="SoundFrequencyDesc">Własna częstotliwość urządzenia oszczędza jedno przeliczenie.</String>
<String key="SoundDeviceRate">Częstotliwość urządzenia</String>
<String key="SoundDoppler">Efekt Dopplera</String>
<String key="SoundDopplerDesc">Zmiana wysokości dźwięku przejeżdżającego pojazdu. 0 – wyłączony, 1 – fizyczny.</String>
<String key="SoundLowpass">Stłumione dźwięki spoza kabiny</String>
<String key="SoundLowpassDesc">Dźwięki słyszane przez ściany kabiny tracą wysokie tony.</String>
<String key="SoundAirAbsorption">Pochłanianie przez powietrze</String>
<String key="SoundAirAbsorptionDesc">Odległe dźwięki tracą wysokie tony. 0 – wyłączone, 1 – naturalne.</String>
<String key="Advanced">Zaawansowane</String>
<String key="AdvancedMode">Tryb zaawansowany</String>
@@ -723,8 +752,9 @@
<String key="StartFreeFly">Uruchom bez pojazdu</String>
<String key="StartEditorShort">Edytor scenerii</String>
<String key="StartEditorWizard">Utwórz nową scenerię</String>
<String key="StartEditorWizardTip">Kreator nowej scenerii w edytorze symulatora.</String>
<String key="StartEditorWizardTip">Kreator nowej scenerii w edytorze symulatora. Edytor mają tylko niektóre wersje.</String>
<String key="StartEditor">Uruchom edytor scenerii</String>
<String key="StartEditorWarning">Edytor scenerii (eu07 -edit) mają tylko niektóre wersje symulatora. Jeśli wybrany plik symulatora go nie obsługuje, edytor się nie otworzy. Edytor pracuje na samym pliku {0}, a nie na kopii przygotowanej przez starter, więc zapisane zmiany trafią do scenerii. Uruchomić?</String>
<String key="DebugLogVisible">Log w konsoli</String>
<String key="PyScreenPriority">Odświeżanie ekranów dodatkowych</String>
<String key="PyScreenPriorityDesc">Jak często odświeżać ekrany w kabinie. Rzadziej to więcej FPS.</String>
+25 -5
View File
@@ -48,13 +48,12 @@
<String key="SeasonWinter">Зима</String>
<String key="OvercastRandom">Случайно</String>
<String key="OvercastClear">Ясно</String>
<String key="OvercastFair">Малооблачно</String>
<String key="OvercastLight">Лёгкая облачность</String>
<String key="OvercastModerate">Умеренная облачность</String>
<String key="OvercastHeavy">Сильная облачность</String>
<String key="OvercastCloudy">Пасмурно</String>
<String key="OvercastRainLight">Небольшой дождь</String>
<String key="OvercastRain">Дождь</String>
<String key="OvercastSnowLight">Небольшой снег</String>
<String key="OvercastSnow">Снег</String>
<String key="OvercastStorm">Гроза</String>
<String key="WeatherDateTime">Дата и время</String>
<String key="WeatherConditions">Погодные условия</String>
<String key="Consist">Состав</String>
@@ -526,6 +525,26 @@
<String key="VehiclesVolume">Громкость подвижного состава</String>
<String key="PositionedSoundsVolume">Громкость позиционных звуков</String>
<String key="AmbientVolume">Громкость окружения</String>
<String key="SoundDevice">Звуковое устройство и эффекты</String>
<String key="SoundOutputDevice">Устройство вывода</String>
<String key="SoundSystemDefault">Системное по умолчанию</String>
<String key="SoundOutputMode">Конфигурация динамиков</String>
<String key="SoundAutomatic">Автоматически</String>
<String key="SoundStereoBasic">Стерео (простое панорамирование)</String>
<String key="SoundStereoUhj">Стерео (UHJ, шире)</String>
<String key="SoundHeadphones">Наушники (HRTF)</String>
<String key="SoundOn">Вкл.</String>
<String key="SoundOff">Выкл.</String>
<String key="SoundHrtfProfile">Набор данных HRTF</String>
<String key="SoundLibraryChoice">Выбор библиотеки</String>
<String key="SoundResampler">Передискретизация</String>
<String key="SoundLibraryDefault">По умолчанию библиотеки</String>
<String key="SoundLimiter">Ограничитель выхода</String>
<String key="SoundFrequency">Частота микширования</String>
<String key="SoundDeviceRate">Частота устройства</String>
<String key="SoundDoppler">Эффект Доплера</String>
<String key="SoundLowpass">Приглушённые звуки вне кабины</String>
<String key="SoundAirAbsorption">Поглощение воздухом</String>
<String key="Advanced">Дополнительно</String>
<String key="AdvancedMode">Расширенный режим</String>
@@ -697,8 +716,9 @@
<String key="StartFreeFly">Запустить без транспорта</String>
<String key="StartEditorShort">Редактор сценария</String>
<String key="StartEditorWizard">Создать новый сценарий</String>
<String key="StartEditorWizardTip">Мастер нового сценария в редакторе симулятора.</String>
<String key="StartEditorWizardTip">Мастер нового сценария в редакторе симулятора. Редактор есть только в некоторых версиях.</String>
<String key="StartEditor">Запустить редактор сценария</String>
<String key="StartEditorWarning">Редактор сценария (eu07 -edit) есть только в некоторых версиях симулятора. Если выбранный симулятор его не поддерживает, редактор не откроется. Он работает с самим файлом {0}, а не с копией стартера, поэтому сохранённые изменения попадут в сценарий. Запустить?</String>
<String key="DebugLogVisible">Показывать ход симуляции</String>
<String key="PyScreenPriority">Частота обновления дополнительных экранов</String>
<String key="PyPriorityNormal">Стандартная</String>
+25 -5
View File
@@ -48,13 +48,12 @@
<String key="SeasonWinter">冬</String>
<String key="OvercastRandom">随机</String>
<String key="OvercastClear">晴</String>
<String key="OvercastFair">晴好</String>
<String key="OvercastLight">少云</String>
<String key="OvercastModerate">多云</String>
<String key="OvercastHeavy">阴</String>
<String key="OvercastCloudy">阴天</String>
<String key="OvercastRainLight">小雨</String>
<String key="OvercastRain">雨</String>
<String key="OvercastSnowLight">小雪</String>
<String key="OvercastSnow">雪</String>
<String key="OvercastStorm">雷暴</String>
<String key="WeatherDateTime">日期和时间</String>
<String key="WeatherConditions">天气状况</String>
<String key="Consist">编组</String>
@@ -548,6 +547,26 @@
<String key="VehiclesVolume">车辆音量</String>
<String key="PositionedSoundsVolume">定位声音音量</String>
<String key="AmbientVolume">环境音量</String>
<String key="SoundDevice">声音设备与效果</String>
<String key="SoundOutputDevice">输出设备</String>
<String key="SoundSystemDefault">系统默认</String>
<String key="SoundOutputMode">扬声器布局</String>
<String key="SoundAutomatic">自动</String>
<String key="SoundStereoBasic">立体声(简单声像)</String>
<String key="SoundStereoUhj">立体声(UHJ,更宽)</String>
<String key="SoundHeadphones">耳机(HRTF)</String>
<String key="SoundOn">开</String>
<String key="SoundOff">关</String>
<String key="SoundHrtfProfile">HRTF 数据集</String>
<String key="SoundLibraryChoice">由库选择</String>
<String key="SoundResampler">重采样器</String>
<String key="SoundLibraryDefault">库默认值</String>
<String key="SoundLimiter">输出限幅器</String>
<String key="SoundFrequency">混音采样率</String>
<String key="SoundDeviceRate">设备采样率</String>
<String key="SoundDoppler">多普勒效应</String>
<String key="SoundLowpass">驾驶室外的声音变闷</String>
<String key="SoundAirAbsorption">空气吸收</String>
<String key="Advanced">高级</String>
<String key="AdvancedMode">Advanced mode</String> <!-- untranslated -->
@@ -717,8 +736,9 @@
<String key="StartFreeFly">不加载车辆直接开始</String>
<String key="StartEditorShort">线路编辑器</String>
<String key="StartEditorWizard">创建新线路</String>
<String key="StartEditorWizardTip">模拟器编辑器中的新线路向导。</String>
<String key="StartEditorWizardTip">模拟器编辑器中的新线路向导。只有部分版本带有编辑器。</String>
<String key="StartEditor">打开线路编辑器</String>
<String key="StartEditorWarning">只有部分模拟器版本带有线路编辑器(eu07 -edit)。如果所选模拟器没有,编辑器将不会打开。它直接在 {0} 上工作,而不是启动器的副本,因此保存的内容会写入线路。要启动吗?</String>
<String key="DebugLogVisible">在控制台显示日志</String>
<String key="PyScreenPriority">额外的屏幕刷新延迟</String>
<String key="PyScreenPriorityDesc">Python 驾驶室屏幕两次更新之间的最小时间(毫秒)。数值越大更新越少。</String>