Change default audio backend on non-windows

FAudio is preferred, but if we didn't build with FAudio, we default to OpenAL
Also changed it to explicitly use xaudio backend on windows, rather than the static cast we had before.
This commit is contained in:
Zion Nimchuk 2020-03-16 22:31:41 -07:00 committed by Megamouse
parent c9b5ba4a5c
commit 2678ac6382
1 changed files with 8 additions and 1 deletions

View File

@ -194,7 +194,14 @@ struct cfg_root : cfg::node
{
node_audio(cfg::node* _this) : cfg::node(_this, "Audio") {}
cfg::_enum<audio_renderer> renderer{ this, "Renderer", static_cast<audio_renderer>(1) };
cfg::_enum<audio_renderer> renderer{ this, "Renderer",
#ifdef _WIN32
audio_renderer::xaudio };
#elif HAVE_FAUDIO
audio_renderer::faudio };
#else
audio_renderer::openal };
#endif
cfg::_bool dump_to_file{ this, "Dump to file" };
cfg::_bool convert_to_u16{ this, "Convert to 16 bit" };