| 289 | } |
| 290 | |
| 291 | void DspHost::updateReverb(DspConfig* config) |
| 292 | { |
| 293 | #define GET_PARAM(key,type,defaults,msg) \ |
| 294 | bool key##Exists; \ |
| 295 | float key = config->get<type>(DspConfig::reverb_##key, &key##Exists); \ |
| 296 | if(!key##Exists) { \ |
| 297 | util::warning(msg); \ |
| 298 | key = defaults; \ |
| 299 | } |
| 300 | |
| 301 | std::string msg = "At least one reverb parameter is unset. " |
| 302 | "Attempting to fill out with defaults; this may cause unexpected audio changes."; |
| 303 | |
| 304 | GET_PARAM(bassboost, float, 0.15, msg); |
| 305 | GET_PARAM(decay, float, 3.2, msg); |
| 306 | GET_PARAM(delay, float, 20, msg); |
| 307 | GET_PARAM(finaldry, float, -7.0, msg); |
| 308 | GET_PARAM(finalwet, float, -9.0, msg); |
| 309 | GET_PARAM(lfo_spin, float, 0.7, msg); |
| 310 | GET_PARAM(lfo_wander, float, 0.25, msg); |
| 311 | GET_PARAM(lpf_bass, int, 500, msg); |
| 312 | GET_PARAM(lpf_damp, int, 7000, msg); |
| 313 | GET_PARAM(lpf_input, int, 17000, msg); |
| 314 | GET_PARAM(lpf_output, int, 10000, msg); |
| 315 | GET_PARAM(osf, int, 1, msg); |
| 316 | GET_PARAM(reflection_amount, float, 0.40, msg); |
| 317 | GET_PARAM(reflection_factor, float, 1.6, msg); |
| 318 | GET_PARAM(reflection_width, float, 0.7, msg); |
| 319 | GET_PARAM(wet, float, 0, msg); |
| 320 | GET_PARAM(width, float, 1.0, msg); |
| 321 | |
| 322 | sf_advancereverb(&cast(this->_dsp)->reverb, cast(this->_dsp)->fs, osf, reflection_amount, finalwet, finaldry, |
| 323 | reflection_factor, reflection_width, width, wet, lfo_wander, bassboost, lfo_spin, |
| 324 | lpf_input, lpf_bass, lpf_damp, lpf_output, decay, delay / 1000.0f); |
| 325 | #undef GET_PARAM |
| 326 | } |
| 327 | |
| 328 | void DspHost::updateConvolver(DspConfig *config) |
| 329 | { |
nothing calls this directly
no test coverage detected