diff options
author | Lioncash <mathew1800@gmail.com> | 2019-03-10 00:05:58 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-03-10 00:06:23 +0100 |
commit | 4a4e87e971a348198c12c32e59372f42fabfc1b7 (patch) | |
tree | 7dbd52f727114e25f1b179a531ce0a48d94c97ff | |
parent | Merge pull request #2210 from lioncash/optional (diff) | |
download | yuzu-4a4e87e971a348198c12c32e59372f42fabfc1b7.tar yuzu-4a4e87e971a348198c12c32e59372f42fabfc1b7.tar.gz yuzu-4a4e87e971a348198c12c32e59372f42fabfc1b7.tar.bz2 yuzu-4a4e87e971a348198c12c32e59372f42fabfc1b7.tar.lz yuzu-4a4e87e971a348198c12c32e59372f42fabfc1b7.tar.xz yuzu-4a4e87e971a348198c12c32e59372f42fabfc1b7.tar.zst yuzu-4a4e87e971a348198c12c32e59372f42fabfc1b7.zip |
-rw-r--r-- | src/audio_core/cubeb_sink.cpp | 6 | ||||
-rw-r--r-- | src/audio_core/cubeb_sink.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/audio_core/cubeb_sink.cpp b/src/audio_core/cubeb_sink.cpp index 1da0b9f2a..7047ed9cf 100644 --- a/src/audio_core/cubeb_sink.cpp +++ b/src/audio_core/cubeb_sink.cpp @@ -12,7 +12,7 @@ #include "common/ring_buffer.h" #include "core/settings.h" -#ifdef _MSC_VER +#ifdef _WIN32 #include <objbase.h> #endif @@ -113,7 +113,7 @@ private: CubebSink::CubebSink(std::string_view target_device_name) { // Cubeb requires COM to be initialized on the thread calling cubeb_init on Windows -#ifdef _MSC_VER +#ifdef _WIN32 com_init_result = CoInitializeEx(nullptr, COINIT_MULTITHREADED); #endif @@ -152,7 +152,7 @@ CubebSink::~CubebSink() { cubeb_destroy(ctx); -#ifdef _MSC_VER +#ifdef _WIN32 if (SUCCEEDED(com_init_result)) { CoUninitialize(); } diff --git a/src/audio_core/cubeb_sink.h b/src/audio_core/cubeb_sink.h index 511df7bb1..7ce850f47 100644 --- a/src/audio_core/cubeb_sink.h +++ b/src/audio_core/cubeb_sink.h @@ -26,7 +26,7 @@ private: cubeb_devid output_device{}; std::vector<SinkStreamPtr> sink_streams; -#ifdef _MSC_VER +#ifdef _WIN32 u32 com_init_result = 0; #endif }; |