MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / sendParamChangeToRemote

Function sendParamChangeToRemote

src/CardinalRemote.cpp:162–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void sendParamChangeToRemote(RemoteDetails* const remote, int64_t moduleId, int paramId, float value)
163{
164#ifdef CARDINAL_REMOTE_ENABLED
165#if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
166 char paramBuf[512] = {};
167 {
168 const ScopedSafeLocale cssl;
169 std::snprintf(paramBuf, sizeof(paramBuf), "%lld:%d:%f", (long long)moduleId, paramId, value);
170 }
171 static_cast<CardinalBaseUI*>(remote->handle)->setState("param", paramBuf);
172#elif defined(HAVE_LIBLO)
173 const lo_address addr = lo_address_new_from_url(remote->url);
174 DISTRHO_SAFE_ASSERT_RETURN(addr != nullptr,);
175
176 lo_send(addr, "/param", "hif", moduleId, paramId, value);
177
178 lo_address_free(addr);
179#endif
180#endif
181}
182
183void sendFullPatchToRemote(RemoteDetails* const remote)
184{

Callers

nothing calls this directly

Calls 1

setStateMethod · 0.45

Tested by

no test coverage detected