Skip to content

Commit

Permalink
Initialise OLE in RemoteVstPlugin
Browse files Browse the repository at this point in the history
Some plugins don't initialise it themselves, expecting it already to be
done for them, and so are liable to hang without it (e.g. TX16Wx).

Co-authored-by: Hyunjin Song <[email protected]>
Co-authored-by: Dominic Clark <[email protected]>
  • Loading branch information
3 people committed Sep 11, 2018
1 parent 0ad8527 commit 4c7c68f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/vst_base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ SET(WINE_CXX_ARGS
-L${WINE_LIBRARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp
-std=c++0x
-mwindows -lpthread ${EXTRA_FLAGS} -fno-omit-frame-pointer
-mwindows -lpthread -lole32 ${EXTRA_FLAGS} -fno-omit-frame-pointer
${WINE_BUILD_FLAGS}
-o ../RemoteVstPlugin
)
Expand Down
3 changes: 3 additions & 0 deletions plugins/vst_base/RemoteVstPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2061,6 +2061,8 @@ int main( int _argc, char * * _argv )
return -1;
}

OleInitialize(nullptr);

This comment has been minimized.

Copy link
@falkTX

falkTX Sep 12, 2018

Contributor

shouldn't this go inside LMMS_BUILD_WIN32 ?

This comment has been minimized.

Copy link
@DomClark

DomClark Sep 18, 2018

Author Member

No - on Linux, LMMS uses Wine to run Windows VST plugins, so the fix is required there as well. See the discussion in #4366.


#ifdef LMMS_BUILD_WIN32
#ifndef __WINPTHREADS_VERSION
// (non-portable) initialization of statically linked pthread library
Expand Down Expand Up @@ -2176,6 +2178,7 @@ int main( int _argc, char * * _argv )

delete __plugin;

OleUninitialize();

#ifdef LMMS_BUILD_WIN32
#ifndef __WINPTHREADS_VERSION
Expand Down

0 comments on commit 4c7c68f

Please sign in to comment.