💥 Use interior mutability for parameters

Instead of the previous technically-unsound approach. While it wouldn't
cause any issues in practice, it did break Rust's guarantees. That was a
design choice after adding support for editors in NIH-plug, but this is
probably the better long term solution.

The downside is that all uses of `param.value` now need to be changed to
`param.value()`.
This commit is contained in:
Robbert van der Helm
2022-09-06 21:55:14 +02:00
parent 5966e353da
commit c566888fa3
17 changed files with 262 additions and 238 deletions

View File

@@ -120,7 +120,7 @@ impl Plugin for Gain {
setter.end_set_parameter(&params.gain);
new_value
}
None => params.gain.value as f64,
None => params.gain.value() as f64,
}
})
.suffix(" dB"),