MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / handleAsyncUpdate

Method handleAsyncUpdate

Source/Core/CtrlrModulator/CtrlrModulatorProcessor.cpp:33–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void CtrlrModulatorProcessor::handleAsyncUpdate()
34{
35 {
36 /* update the GUI and the ValueTree from the value provided by the HOST or
37 the MIDI subsystem */
38 const ScopedReadLock sl (processorLock);
39
40 /* If we already have the same value, calling setProperty on the ValueTree won't cause a
41 propertyChanged callback, we need to remove the property and re-set it */
42 if ((double)owner.getProperty(Ids::modulatorValue) == currentValue.value)
43 {
44 owner.removeProperty(Ids::modulatorValue);
45 }
46 owner.setProperty (Ids::modulatorValue, currentValue.value);
47 }
48
49 if (valueChangedCbk.get() && !owner.getRestoreState())
50 {
51 CtrlrPanel &ownerPanel = owner.getOwnerPanel();
52 if (!ownerPanel.getRestoreState() && !ownerPanel.getBootstrapState() && valueChangedCbk->isValid())
53 {
54 owner.getOwnerPanel().getCtrlrLuaManager().getMethodManager().call (valueChangedCbk,
55 &owner,
56 currentValue.value,
57 (uint8)currentValue.lastChangeSource);
58 }
59 }
60
61 if (linkedToGlobal)
62 {
63 owner.getOwnerPanel().setGlobalVariable (getLinkedToGlobalIndex(), currentValue.value);
64 }
65}
66
67void CtrlrModulatorProcessor::setValue(const int value)
68{

Callers

nothing calls this directly

Calls 9

getBootstrapStateMethod · 0.80
setGlobalVariableMethod · 0.80
getPropertyMethod · 0.45
removePropertyMethod · 0.45
setPropertyMethod · 0.45
getMethod · 0.45
getRestoreStateMethod · 0.45
isValidMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected