diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2019-08-08 19:24:54 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2019-08-08 19:24:54 +0000 |
| commit | 5107dab4cbeb0241ae4a58dbd9947d45c0c6642a (patch) | |
| tree | e22400ab9379a57ceaab2804eec54a63af9ed179 /src | |
| parent | 3e97be43cfc00376522a545b321061af93e316b6 (diff) | |
| download | qmmp-5107dab4cbeb0241ae4a58dbd9947d45c0c6642a.tar.gz qmmp-5107dab4cbeb0241ae4a58dbd9947d45c0c6642a.tar.bz2 qmmp-5107dab4cbeb0241ae4a58dbd9947d45c0c6642a.zip | |
equalizer: fixed multiple channels support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9034 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
| -rw-r--r-- | src/qmmp/outputwriter.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/qmmp/outputwriter.cpp b/src/qmmp/outputwriter.cpp index 3f5129684..524585790 100644 --- a/src/qmmp/outputwriter.cpp +++ b/src/qmmp/outputwriter.cpp @@ -383,13 +383,15 @@ void OutputWriter::updateEqSettings() init_iir(m_frequency, bands); set_two_passes(m_settings->eqSettings().twoPasses()); - set_preamp(0, 1.0 + 0.0932471 *preamp + 0.00279033 * preamp * preamp); - set_preamp(1, 1.0 + 0.0932471 *preamp + 0.00279033 * preamp * preamp); - for(int i = 0; i < bands; ++i) + for(int ch = 0; ch < m_channels; ++ch) { - double value = m_settings->eqSettings().gain(i); - set_gain(i,0, 0.03*value+0.000999999*value*value); - set_gain(i,1, 0.03*value+0.000999999*value*value); + set_preamp(ch, 1.0 + 0.0932471 *preamp + 0.00279033 * preamp * preamp); + + for(int i = 0; i < bands; ++i) + { + double value = m_settings->eqSettings().gain(i); + set_gain(i, ch, 0.03 * value + 0.000999999 * value * value); + } } } m_useEq = m_settings->eqSettings().isEnabled(); |
