added type string method to SAtom

This commit is contained in:
Weird Constructor 2021-10-10 08:54:29 +02:00
parent 6acb4ead09
commit 9835ceb66e
2 changed files with 11 additions and 1 deletions

View file

@ -62,6 +62,16 @@ impl SAtom {
_ => None,
}
}
pub fn type_str(&self) -> &str {
match self {
SAtom::Str(_) => "str",
SAtom::MicroSample(_) => "micro_sample",
SAtom::AudioSample(_) => "audio_sample",
SAtom::Setting(_) => "setting",
SAtom::Param(_) => "param",
}
}
}
impl From<f32> for SAtom {

View file

@ -399,7 +399,7 @@ pub trait MatrixObserver {
/// Called when a parameter or it's modulation amount is changing.
/// Not called, when [MatrixObserver::update_all] tells you that
/// everything has changed.
fn update_param(&self, ParamId: &ParamId);
fn update_param(&self, param_id: &ParamId);
/// Called when the matrix graph was changed, usually called
/// when [Matrix::sync] is called.
/// Usually also called when [MatrixObserver::update_all] was called.