MCPcopy Create free account
hub / github.com/DISTRHO/DPF / parameterChanged

Function parameterChanged

examples/ExternalUI/ExternalExampleUI.cpp:111–129  ·  view source on GitHub ↗

A parameter has changed on the plugin side. This is called by the host to inform the UI about parameter changes. */

Source from the content-addressed store, hash-verified

109 This is called by the host to inform the UI about parameter changes.
110 */
111 void parameterChanged(uint32_t index, float value) override
112 {
113 if (index != 0)
114 return;
115
116 fValue = value;
117
118 #ifdef KDE_FIFO_TEST
119 if (fFifo == -1)
120 return;
121
122 // NOTE: This is a terrible way to pass values, also locale might get in the way...
123 char valueStr[24];
124 std::memset(valueStr, 0, sizeof(valueStr));
125 std::snprintf(valueStr, 23, "%i\n", static_cast<int>(value + 0.5f));
126
127 DISTRHO_SAFE_ASSERT(writeRetry(fFifo, valueStr, 24) == sizeof(valueStr));
128 #endif
129 }
130
131 /* --------------------------------------------------------------------------------------------------------
132 * External Window overrides */

Callers 1

visibilityChangedFunction · 0.70

Calls 1

writeRetryFunction · 0.85

Tested by

no test coverage detected