Make State cloneable
This is needed for user preset support.
This commit is contained in:
parent
56e9cd54c1
commit
7ca855b3fc
1 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ use crate::plugin::BufferConfig;
|
||||||
// management
|
// management
|
||||||
|
|
||||||
/// A plain, unnormalized value for a parameter.
|
/// A plain, unnormalized value for a parameter.
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
pub enum ParamValue {
|
pub enum ParamValue {
|
||||||
F32(f32),
|
F32(f32),
|
||||||
|
@ -23,7 +23,7 @@ pub enum ParamValue {
|
||||||
|
|
||||||
/// A plugin's state so it can be restored at a later point. This object can be serialized and
|
/// A plugin's state so it can be restored at a later point. This object can be serialized and
|
||||||
/// deserialized using serde.
|
/// deserialized using serde.
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
pub struct State {
|
pub struct State {
|
||||||
/// The plugin's parameter values. These are stored unnormalized. This mean sthe old values will
|
/// The plugin's parameter values. These are stored unnormalized. This mean sthe old values will
|
||||||
/// be recalled when when the parameter's range gets increased. Doing so may still mess with
|
/// be recalled when when the parameter's range gets increased. Doing so may still mess with
|
||||||
|
|
Loading…
Add table
Reference in a new issue