FrontendCommon: Add XAudio2 audio backend

This commit is contained in:
Connor McLaughlin
2021-06-30 15:15:39 +10:00
parent 37e50c62f0
commit 5865064387
8 changed files with 316 additions and 15 deletions

View File

@ -58,6 +58,14 @@
#include <mmsystem.h>
#endif
namespace FrontendCommon {
#ifdef _WIN32
std::unique_ptr<AudioStream> CreateXAudio2AudioStream();
#endif
} // namespace FrontendCommon
Log_SetChannel(CommonHostInterface);
static std::string s_settings_filename;
@ -628,6 +636,11 @@ std::unique_ptr<AudioStream> CommonHostInterface::CreateAudioStream(AudioBackend
case AudioBackend::Cubeb:
return CubebAudioStream::Create();
#ifdef _WIN32
case AudioBackend::XAudio2:
return FrontendCommon::CreateXAudio2AudioStream();
#endif
#ifdef WITH_SDL2
case AudioBackend::SDL:
return SDLAudioStream::Create();
@ -2049,7 +2062,7 @@ void CommonHostInterface::RegisterGeneralHotkeys()
}
}
});
#endif // !defined(__ANDROID__) && defined(WITH_CHEEVOS)
#endif // !defined(__ANDROID__) && defined(WITH_CHEEVOS)
}
void CommonHostInterface::RegisterSystemHotkeys()