Browse Source

Implement update-url for UI bridges

tags/1.9.4
falkTX 11 years ago
parent
commit
d8b1735e74
2 changed files with 17 additions and 0 deletions
  1. +16
    -0
      source/bridges-ui/CarlaBridgeOsc.cpp
  2. +1
    -0
      source/bridges-ui/CarlaBridgeOsc.hpp

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

@@ -165,6 +165,10 @@ int CarlaBridgeOsc::handleMessage(const char* const path, const int argc, const
if (std::strcmp(method, "sample-rate") == 0) if (std::strcmp(method, "sample-rate") == 0)
return 0; // unused return 0; // unused


// special
if (std::strcmp(method, "update_url") == 0)
return handleMsgUpdateURL(argc, argv, types);

#ifdef BRIDGE_LV2 #ifdef BRIDGE_LV2
// LV2 methods // LV2 methods
if (std::strcmp(method, "lv2_atom_transfer") == 0) if (std::strcmp(method, "lv2_atom_transfer") == 0)
@@ -304,6 +308,18 @@ int CarlaBridgeOsc::handleMsgMidi(CARLA_BRIDGE_OSC_HANDLE_ARGS)
return 0; return 0;
} }


int CarlaBridgeOsc::handleMsgUpdateURL(CARLA_BRIDGE_OSC_HANDLE_ARGS)
{
CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(1, "s");
CARLA_SAFE_ASSERT_RETURN(kClient != nullptr, 1);
carla_debug("CarlaBridgeOsc::handleMsgUpdateURL()");

const char* const url = (const char*)&argv[0]->s;

fControlData.setNewURL(url);
return 0;
}

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


CARLA_BRIDGE_END_NAMESPACE CARLA_BRIDGE_END_NAMESPACE

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

@@ -97,6 +97,7 @@ private:
int handleMsgProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS); int handleMsgProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS);
int handleMsgMidiProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS); int handleMsgMidiProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS);
int handleMsgMidi(CARLA_BRIDGE_OSC_HANDLE_ARGS); int handleMsgMidi(CARLA_BRIDGE_OSC_HANDLE_ARGS);
int handleMsgUpdateURL(CARLA_BRIDGE_OSC_HANDLE_ARGS);


int handleMsgShow(); int handleMsgShow();
int handleMsgHide(); int handleMsgHide();


Loading…
Cancel
Save