diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-10-06 08:04:15 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2014-10-06 08:04:15 +0000 |
| commit | 89c9b024bb264f2ea7b07e0dbcc1d80ad374597a (patch) | |
| tree | b5ce75480489c353bad1c0a8390bfe6b8c6b1cad /src/plugins/Effect/stereo/stereoplugin.cpp | |
| parent | 3a67c2b55bc6c7fddfd2d8ac0468aa136319ffca (diff) | |
| download | qmmp-89c9b024bb264f2ea7b07e0dbcc1d80ad374597a.tar.gz qmmp-89c9b024bb264f2ea7b07e0dbcc1d80ad374597a.tar.bz2 qmmp-89c9b024bb264f2ea7b07e0dbcc1d80ad374597a.zip | |
ported effect plugins
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4532 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Effect/stereo/stereoplugin.cpp')
| -rw-r--r-- | src/plugins/Effect/stereo/stereoplugin.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/Effect/stereo/stereoplugin.cpp b/src/plugins/Effect/stereo/stereoplugin.cpp index 07a164ec6..20c27de09 100644 --- a/src/plugins/Effect/stereo/stereoplugin.cpp +++ b/src/plugins/Effect/stereo/stereoplugin.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * Copyright (C) 1999 by Johan Levin * * * - * Copyright (C) 2011 by Ilya Kotov * + * Copyright (C) 2011-2014 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -56,7 +56,7 @@ void StereoPlugin::applyEffect(Buffer *b) if(m_format == Qmmp::PCM_S16LE) { short *data = (short *)b->data; - for (uint i = 0; i < b->nbytes >> 1; i += 2) + for (uint i = 0; i < (b->nbytes >> 1); i += 2) { m_avg = (data[i] + data[i + 1]) / 2; m_ldiff = data[i] - m_avg; @@ -71,7 +71,7 @@ void StereoPlugin::applyEffect(Buffer *b) else if(m_format == Qmmp::PCM_S24LE || m_format == Qmmp::PCM_S32LE) { int *data = (int *)b->data; - for (uint i = 0; i < b->nbytes >> 2; i += 2) + for (uint i = 0; i < (b->nbytes >> 2); i += 2) { m_avg = (data[i] + data[i + 1]) / 2; m_ldiff = data[i] - m_avg; @@ -86,11 +86,11 @@ void StereoPlugin::applyEffect(Buffer *b) m_mutex.unlock(); } -void StereoPlugin::configure(quint32 freq, int chan, Qmmp::AudioFormat format) +void StereoPlugin::configure(quint32 freq, ChannelMap map, Qmmp::AudioFormat format) { - m_chan = chan; + m_chan = map.count(); m_format = format; - Effect::configure(freq, chan, format); + Effect::configure(freq, map, format); } void StereoPlugin::setIntensity(double level) |
