Commit 4f900311 authored by Rafael Kitover's avatar Rafael Kitover
Browse files

persist chosen audio device in config file #353



Write `gopts.audio_dev` to the option `Sound/AudioDevice`.

Clear `gopts.audio_dev` when resetting the driver, because we cannot
assume anything about device enumeration order across sound drivers.
Signed-off-by: default avatarRafael Kitover <rkitover@gmail.com>
parent d94d6d53
......@@ -1571,6 +1571,7 @@ public:
if (newapi == lastapi)
return;
gopts.audio_dev = "";
FillDev(newapi);
}
} sound_config_handler;
......
......@@ -261,6 +261,7 @@ opt_desc opts[] = {
/// Sound
ENUMOPT("Sound/AudioAPI", "", wxTRANSLATE("Sound API; if unsupported, default API will be used"), gopts.audio_api, wxTRANSLATE("sdl|openal|directsound|xaudio2|faudio")),
STROPT("Sound/AudioDevice", "", wxTRANSLATE("Device ID of chosen audio device for chosen driver"), gopts.audio_dev),
INTOPT("Sound/Buffers", "", wxTRANSLATE("Number of sound buffers"), gopts.audio_buffers, 2, 10),
INTOPT("Sound/Enable", "", wxTRANSLATE("Bit mask of sound channels to enable"), gopts.sound_en, 0, 0x30f),
INTOPT("Sound/GBAFiltering", "", wxTRANSLATE("GBA sound filtering (%)"), gopts.gba_sound_filter, 0, 100),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment