cleanup envelopeGenerator initialization
This commit is contained in:
20
src/ParameterStore.cpp
Normal file
20
src/ParameterStore.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
#include "ParameterStore.h"
|
||||
|
||||
ParameterStore::ParameterStore() {
|
||||
resetToDefaults();
|
||||
}
|
||||
|
||||
void ParameterStore::set(ParamId id, float value) {
|
||||
values_[static_cast<size_t>(id)].store(value, std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
float ParameterStore::get(ParamId id) const {
|
||||
return values_[static_cast<size_t>(id)].load(std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
void ParameterStore::resetToDefaults() {
|
||||
for(size_t i = 0; i < PARAM_COUNT; i++) {
|
||||
values_[i].store(PARAM_DEFS[i].def, std::memory_order_relaxed);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user