From d6f3fd23de0ec27002605b3419c0188b0447f5f8 Mon Sep 17 00:00:00 2001 From: ZachBacon Date: Tue, 25 Dec 2018 20:58:31 -0500 Subject: [PATCH] Finish hooking up FAudio to the rest of the frontend --- src/wx/cmdevents.cpp | 2 +- src/wx/sys.cpp | 4 ++++ src/wx/wxvbam.h | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/wx/cmdevents.cpp b/src/wx/cmdevents.cpp index 828721b4..a302fcb4 100644 --- a/src/wx/cmdevents.cpp +++ b/src/wx/cmdevents.cpp @@ -2336,7 +2336,7 @@ EVT_HANDLER_MASK(SoundConfigure, "Sound options...", CMDEN_NREC_ANY) // otherwise reload if API changes (oapi != gopts.audio_api || odev != gopts.audio_dev || // or init-only options - (oapi == AUD_XAUDIO2 && oupmix != gopts.upmix) || (oapi == AUD_DIRECTSOUND && ohw != gopts.dsound_hw_accel))) { + (oapi == AUD_XAUDIO2 && oupmix != gopts.upmix) || (oapi == AUD_FAUDIO && oupmix != gopts.upmix) || (oapi == AUD_DIRECTSOUND && ohw != gopts.dsound_hw_accel))) { soundShutdown(); soundInit(); } diff --git a/src/wx/sys.cpp b/src/wx/sys.cpp index d777c750..271adeb7 100644 --- a/src/wx/sys.cpp +++ b/src/wx/sys.cpp @@ -1096,6 +1096,10 @@ SoundDriver* systemSoundInit() case AUD_XAUDIO2: return newXAudio2_Output(); #endif +#ifndef NO_FAUDIO + case AUD_FAUDIO: + return newFAudio_Output(); +#endif #endif default: diff --git a/src/wx/wxvbam.h b/src/wx/wxvbam.h index 28b15646..6ce0da53 100644 --- a/src/wx/wxvbam.h +++ b/src/wx/wxvbam.h @@ -449,6 +449,7 @@ enum renderer { enum audioapi { AUD_SDL, AUD_OPENAL, AUD_DIRECTSOUND, + AUD_FAUDIO, AUD_XAUDIO2 }; // an unfortunate legacy default; should have a non-digit preceding %d @@ -712,6 +713,8 @@ extern SoundDriver* newDirectSound(); extern bool GetDSDevices(wxArrayString& names, wxArrayString& ids); extern SoundDriver* newXAudio2_Output(); extern bool GetXA2Devices(wxArrayString& names, wxArrayString& ids); +extern SoundDriver* newFAudio_Output(); +extern bool GetFSDevices(wxArrayString& names, wxArrayString& ids); #endif extern bool debugger;