Browse Source

Fix bridged LV2 UIs sometimes not initializing properly

tags/1.9.5
falkTX 10 years ago
parent
commit
f181c77cc4
5 changed files with 16 additions and 4 deletions
  1. +5
    -2
      source/bridges-ui/CarlaBridgeClient.cpp
  2. +1
    -1
      source/bridges-ui/CarlaBridgeClient.hpp
  3. +8
    -0
      source/bridges-ui/CarlaBridgeOsc.cpp
  4. +1
    -0
      source/bridges-ui/CarlaBridgeOsc.hpp
  5. +1
    -1
      source/bridges-ui/CarlaBridgeUI-LV2.cpp

+ 5
- 2
source/bridges-ui/CarlaBridgeClient.cpp View File

@@ -110,9 +110,12 @@ void CarlaBridgeClient::oscInit(const char* const url)
fOsc.init(url);
}

bool CarlaBridgeClient::oscIdle() const
bool CarlaBridgeClient::oscIdle(const bool onlyOnce) const
{
fOsc.idle();
if (onlyOnce)
fOsc.idleOnce();
else
fOsc.idle();

return ! fUI.quit;
}


+ 1
- 1
source/bridges-ui/CarlaBridgeClient.hpp View File

@@ -66,7 +66,7 @@ public:
// osc stuff

void oscInit(const char* const url);
bool oscIdle() const;
bool oscIdle(const bool onlyOnce = false) const;
void oscClose();

bool isOscControlRegistered() const noexcept;


+ 8
- 0
source/bridges-ui/CarlaBridgeOsc.cpp View File

@@ -88,6 +88,14 @@ void CarlaBridgeOsc::idle() const
for (; lo_server_recv_noblock(fServer, 0) != 0;) {}
}

void CarlaBridgeOsc::idleOnce() const
{
if (fServer == nullptr)
return;

lo_server_recv_noblock(fServer, 0);
}

void CarlaBridgeOsc::close()
{
CARLA_ASSERT(fControlData.source == nullptr); // must never be used


+ 1
- 0
source/bridges-ui/CarlaBridgeOsc.hpp View File

@@ -59,6 +59,7 @@ public:

void init(const char* const url);
void idle() const;
void idleOnce() const;
void close();

// -------------------------------------------------------------------


+ 1
- 1
source/bridges-ui/CarlaBridgeUI-LV2.cpp View File

@@ -567,7 +567,7 @@ public:

for (;;)
{
if (fIsReady || ! oscIdle())
if (fIsReady || ! oscIdle(true))
return;
}
}


Loading…
Cancel
Save