diff options
Diffstat (limited to 'src/plugins/Effect/stereo')
| -rw-r--r-- | src/plugins/Effect/stereo/stereoplugin.cpp | 12 | ||||
| -rw-r--r-- | src/plugins/Effect/stereo/stereoplugin.h | 4 |
2 files changed, 8 insertions, 8 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) diff --git a/src/plugins/Effect/stereo/stereoplugin.h b/src/plugins/Effect/stereo/stereoplugin.h index d1a5f7e2f..a9901048b 100644 --- a/src/plugins/Effect/stereo/stereoplugin.h +++ b/src/plugins/Effect/stereo/stereoplugin.h @@ -1,5 +1,5 @@ /*************************************************************************** - * 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 * @@ -34,7 +34,7 @@ public: virtual ~StereoPlugin(); void applyEffect(Buffer *b); - void configure(quint32 freq, int chan, Qmmp::AudioFormat format); + void configure(quint32 freq, ChannelMap map, Qmmp::AudioFormat format); void setIntensity(double level); static StereoPlugin* instance(); |
