| 1000 | } |
| 1001 | |
| 1002 | void Controller::updateSGC() { |
| 1003 | double sgc_gain_db{0.0}; |
| 1004 | for (const size_t& band : not_off_total_) { |
| 1005 | if (c_filter_status_[band] == kOn) { |
| 1006 | switch (c_lrms_[band]) { |
| 1007 | case kStereo: { |
| 1008 | sgc_gain_db += sgc_values_[band]; |
| 1009 | break; |
| 1010 | } |
| 1011 | case kLeft: |
| 1012 | case kRight: { |
| 1013 | sgc_gain_db += 0.5 * sgc_values_[band]; |
| 1014 | break; |
| 1015 | } |
| 1016 | case kMid: { |
| 1017 | sgc_gain_db += 0.9 * sgc_values_[band]; |
| 1018 | break; |
| 1019 | } |
| 1020 | case kSide: { |
| 1021 | sgc_gain_db += 0.1 * sgc_values_[band]; |
| 1022 | break; |
| 1023 | } |
| 1024 | } |
| 1025 | } |
| 1026 | } |
| 1027 | c_sgc_gain_linear_ = zldsp::chore::decibelsToGain(sgc_gain_db); |
| 1028 | sgc_gain_.setGainLinear(c_sgc_gain_linear_); |
| 1029 | } |
| 1030 | |
| 1031 | void Controller::updateOutputGain() { |
| 1032 | double total = c_makeup_gain_linear_; |
nothing calls this directly
no test coverage detected