summaryrefslogtreecommitdiffstats
path: root/drivers/wasapi
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2023-07-20 12:14:16 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2023-07-20 12:14:16 +0300
commit4bfb820d32af271e75348368ca381f5b9e3f4a49 (patch)
tree0f99264c327312f9f701521223a1ca9b33f8fa65 /drivers/wasapi
parent0c2144da908a8223e188d27ed1d31d8248056c78 (diff)
downloadredot-engine-4bfb820d32af271e75348368ca381f5b9e3f4a49.tar.gz
[Windows] Initialize COM as apartment-threaded.
Diffstat (limited to 'drivers/wasapi')
-rw-r--r--drivers/wasapi/audio_driver_wasapi.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp
index eeeb6ee689..6c84aee2b7 100644
--- a/drivers/wasapi/audio_driver_wasapi.cpp
+++ b/drivers/wasapi/audio_driver_wasapi.cpp
@@ -706,7 +706,7 @@ void AudioDriverWASAPI::write_sample(WORD format_tag, int bits_per_sample, BYTE
}
void AudioDriverWASAPI::thread_func(void *p_udata) {
- CoInitializeEx(nullptr, COINIT_MULTITHREADED);
+ CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
AudioDriverWASAPI *ad = static_cast<AudioDriverWASAPI *>(p_udata);
uint32_t avail_frames = 0;