MCPcopy Create free account
hub / github.com/Audio4Linux/JDSP4Linux / updateGraphicEq

Method updateGraphicEq

src/audio/base/DspHost.cpp:448–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446}
447
448void DspHost::updateGraphicEq(DspConfig *config)
449{
450 bool paramExists;
451 bool enableExists;
452
453 QString eq = chopDoubleQuotes(config->get<QString>(DspConfig::graphiceq_param, &paramExists));
454 bool enabled = config->get<bool>(DspConfig::graphiceq_enable, &enableExists);
455
456 if(!enableExists)
457 {
458 util::warning("Enable switch unset. Disabling graphic eq.");
459 enabled = false;
460 }
461
462 if(!paramExists)
463 {
464 util::error("graphiceq_param property missing. Disabling graphic eq.");
465 enabled = false;
466 }
467
468 if(enabled)
469 {
470 ArbitraryResponseEqualizerStringParser(cast(this->_dsp), eq.toLocal8Bit().data());
471 ArbitraryResponseEqualizerEnable(cast(this->_dsp), 1);
472 }
473 else
474 ArbitraryResponseEqualizerDisable(cast(this->_dsp));
475}
476
477void DspHost::updateCrossfeed(DspConfig* config)
478{

Callers

nothing calls this directly

Calls 6

chopDoubleQuotesFunction · 0.85
castFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected