mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-19 15:02:15 +01:00
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.
This commit is contained in:
@@ -100,6 +100,7 @@ public partial class Settings : UserControl, ISettingsCapture
|
||||
BuildPresetButtons();
|
||||
BuildMonitorRates();
|
||||
ReadGraphicsCards();
|
||||
ReadAudioChoices();
|
||||
App.Loc.LanguageChanged += UpdateCardText;
|
||||
App.Loc.LanguageChanged += _keyRows.UpdateTexts;
|
||||
|
||||
@@ -436,6 +437,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;
|
||||
@@ -869,6 +871,7 @@ public partial class Settings : UserControl, ISettingsCapture
|
||||
s.LogMissingVehicleFiles = IsChecked(LogMissingVehicleFilesCb);
|
||||
|
||||
CaptureGraphics(s);
|
||||
CaptureSound(s);
|
||||
s.Gpu = SelectedGpu();
|
||||
ReadResolution(s);
|
||||
s.BufferScalePercent = (int)bufferScale.Value;
|
||||
|
||||
Reference in New Issue
Block a user