Always initialize Microsoft COM unconditionally

This commit is contained in:
Robbert van der Helm
2021-06-07 22:24:48 +02:00
parent a7496fae77
commit da5f6e9e7d
5 changed files with 16 additions and 32 deletions
+5
View File
@@ -69,6 +69,11 @@ __cdecl
std::cerr << "Preparing to load " << plugin_type_to_string(plugin_type)
<< " plugin at '" << plugin_location << "'" << std::endl;
// NOTE: Some plugins use Microsoft COM, but don't initialize it first and
// just pray the host does it for them. Examples of this are
// PSPaudioware's InfiniStrip and Shattered Glass Audio Code Red Free.
OleInitialize(nullptr);
// As explained in `Vst2Bridge`, the plugin has to be initialized in the
// same thread as the one that calls `io_context.run()`. This setup is
// slightly more convoluted than it has to be, but doing it this way we