Browse Source

Give high priority to wine threads using carla-single bridges

tags/1.9.8
falkTX 7 years ago
parent
commit
a8440a796f
2 changed files with 11 additions and 3 deletions
  1. +10
    -2
      source/jackbridge/JackBridge1.cpp
  2. +1
    -1
      source/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp

+ 10
- 2
source/jackbridge/JackBridge1.cpp View File

@@ -649,9 +649,17 @@ struct WineBridge {
inst.creator_arg = arg; inst.creator_arg = arg;
inst.creator_handle = ::CreateEventW(nullptr, false, false, nullptr); inst.creator_handle = ::CreateEventW(nullptr, false, false, nullptr);


::CreateThread(NULL, 0, thread_creator_helper, arg, 0, 0);
::WaitForSingleObject(inst.creator_handle, INFINITE);
HANDLE handle = ::CreateThread(nullptr, 0, thread_creator_helper, arg, CREATE_SUSPENDED, nullptr);

if (handle == INVALID_HANDLE_VALUE)
return 1;

// TODO read attrs and decide this
SetThreadPriority(handle, THREAD_PRIORITY_TIME_CRITICAL);


ResumeThread(handle);

::WaitForSingleObject(inst.creator_handle, INFINITE);
*thread_id = inst.creator_pthread; *thread_id = inst.creator_pthread;
return 0; return 0;
} }


+ 1
- 1
source/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp View File

@@ -1426,7 +1426,7 @@ private:
static pointer_sized_int getHostName (char* name) static pointer_sized_int getHostName (char* name)
{ {
String hostName ("Juce VST Host");
String hostName ("Carla Plugin Host");
if (auto* app = JUCEApplicationBase::getInstance()) if (auto* app = JUCEApplicationBase::getInstance())
hostName = app->getApplicationName(); hostName = app->getApplicationName();


Loading…
Cancel
Save