| 259 | } |
| 260 | |
| 261 | void Controller::prepareOneBandDynamics(const size_t i) { |
| 262 | if (dynamic_on_[i].load(std::memory_order::relaxed) && ( |
| 263 | filter_paras_[i].filter_type == zldsp::filter::kPeak || |
| 264 | filter_paras_[i].filter_type == zldsp::filter::kLowShelf || |
| 265 | filter_paras_[i].filter_type == zldsp::filter::kHighShelf || |
| 266 | filter_paras_[i].filter_type == zldsp::filter::kTiltShelf || |
| 267 | filter_paras_[i].filter_type == zldsp::filter::kFlatTilt)) { |
| 268 | // turn on dynamic |
| 269 | if (c_dynamic_on_[i] != true) { |
| 270 | c_dynamic_on_[i] = true; |
| 271 | svf_filters_[i].resetDynamic(); |
| 272 | svf_filters_[i].getFilter().cacheDynPara(); |
| 273 | parallel_filters_[i].resetDynamic(); |
| 274 | parallel_filters_[i].getFilter().cacheDynPara(); |
| 275 | tdf_filters_[i].resetDynamic(); |
| 276 | tdf_filters_[i].getFilter().cacheDynPara(); |
| 277 | side_filters_[i].reset(); |
| 278 | to_update_correction_indices_ = true; |
| 279 | |
| 280 | side_empty_update_flags_[i].signal(); |
| 281 | dynamic_th_update_[i].signal(); |
| 282 | dynamic_ar_update_[i].signal(); |
| 283 | dynamic_extra_update_[i].signal(); |
| 284 | } |
| 285 | } else { |
| 286 | // turn dynamic off and reset filter gain |
| 287 | if (c_dynamic_on_[i] != false) { |
| 288 | c_dynamic_on_[i] = false; |
| 289 | svf_filters_[i].resetDynamic(); |
| 290 | parallel_filters_[i].resetDynamic(); |
| 291 | tdf_filters_[i].resetDynamic(); |
| 292 | current_gains_[i].store(dynamic_side_handlers_[i].getBaseGain(), std::memory_order::relaxed); |
| 293 | to_update_correction_indices_ = true; |
| 294 | } |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | void Controller::prepareCorrectionIndices() { |
| 299 | correction_on_total_.clear(); |
nothing calls this directly
no test coverage detected