A parameter has changed on the plugin side. This is called by the host to inform the UI about parameter changes. */
| 55 | This is called by the host to inform the UI about parameter changes. |
| 56 | */ |
| 57 | void parameterChanged(uint32_t index, float value) override |
| 58 | { |
| 59 | switch (index) |
| 60 | { |
| 61 | case 0: // color |
| 62 | updateColor(std::round(value)); |
| 63 | break; |
| 64 | |
| 65 | case 1: // out-left |
| 66 | value = (fOutLeft * kSmoothMultiplier + value) / (kSmoothMultiplier + 1.0f); |
| 67 | |
| 68 | /**/ if (value < 0.001f) value = 0.0f; |
| 69 | else if (value > 0.999f) value = 1.0f; |
| 70 | |
| 71 | if (fOutLeft != value) |
| 72 | { |
| 73 | fOutLeft = value; |
| 74 | repaint(); |
| 75 | } |
| 76 | break; |
| 77 | |
| 78 | case 2: // out-right |
| 79 | value = (fOutRight * kSmoothMultiplier + value) / (kSmoothMultiplier + 1.0f); |
| 80 | |
| 81 | /**/ if (value < 0.001f) value = 0.0f; |
| 82 | else if (value > 0.999f) value = 1.0f; |
| 83 | |
| 84 | if (fOutRight != value) |
| 85 | { |
| 86 | fOutRight = value; |
| 87 | repaint(); |
| 88 | } |
| 89 | break; |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | A state has changed on the plugin side. |
nothing calls this directly
no test coverage detected