| 31 | } |
| 32 | |
| 33 | void 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 | |
| 67 | void CtrlrModulatorProcessor::setValue(const int value) |
| 68 | { |
nothing calls this directly
no test coverage detected