From 9835ceb66ed90fc29ec4252928ad7b5fd18abd30 Mon Sep 17 00:00:00 2001 From: Weird Constructor Date: Sun, 10 Oct 2021 08:54:29 +0200 Subject: [PATCH] added type string method to SAtom --- src/dsp/satom.rs | 10 ++++++++++ src/matrix.rs | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/dsp/satom.rs b/src/dsp/satom.rs index f1ecae7..94aa9cc 100644 --- a/src/dsp/satom.rs +++ b/src/dsp/satom.rs @@ -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 for SAtom { diff --git a/src/matrix.rs b/src/matrix.rs index f0d80ca..b0a106b 100644 --- a/src/matrix.rs +++ b/src/matrix.rs @@ -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.