diff options
Diffstat (limited to 'host/lib/utils')
-rw-r--r-- | host/lib/utils/gain_group.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/host/lib/utils/gain_group.cpp b/host/lib/utils/gain_group.cpp index 50edf2515..0e4df6469 100644 --- a/host/lib/utils/gain_group.cpp +++ b/host/lib/utils/gain_group.cpp @@ -182,3 +182,14 @@ private: gain_group::sptr gain_group::make(void){ return sptr(new gain_group_impl()); } + +gain_group::sptr gain_group::make_zero() +{ + gain_fcns_t gain_fcns; + gain_fcns.get_range = []() { return meta_range_t(0.0, 0.0); }; + gain_fcns.get_value = []() { return 0.0; }; + gain_fcns.set_value = [](const double) {}; + auto gg = make(); + gg->register_fcns("null", gain_fcns); + return gg; +} |