Windows/Audio: add listener for device change

For some reason XAudio2 doesn't automatically change the device anymore.
So let's just listen for the OnDefaultDeviceChanged event and update the cell audio thread if necessary.
This commit is contained in:
Megamouse 2021-08-23 21:33:20 +02:00
parent 4e139ee080
commit 72f0637efe
10 changed files with 161 additions and 8 deletions

View file

@ -16,7 +16,7 @@
#endif
#ifdef _WIN32
std::string wchar_to_utf8(wchar_t *src)
std::string wchar_to_utf8(const wchar_t *src)
{
std::string utf8_string;
const auto tmp_size = WideCharToMultiByte(CP_UTF8, 0, src, -1, nullptr, 0, nullptr, nullptr);