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 | |
| 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')
| -rw-r--r-- | src/plugins/Effect/Effect.pro | 6 | ||||
| -rw-r--r-- | src/plugins/Effect/bs2b/bs2bplugin.cpp | 8 | ||||
| -rw-r--r-- | src/plugins/Effect/bs2b/bs2bplugin.h | 4 | ||||
| -rw-r--r-- | src/plugins/Effect/crossfade/crossfadeplugin.cpp | 6 | ||||
| -rw-r--r-- | src/plugins/Effect/crossfade/crossfadeplugin.h | 4 | ||||
| -rw-r--r-- | src/plugins/Effect/ladspa/ladspahelper.cpp | 8 | ||||
| -rw-r--r-- | src/plugins/Effect/ladspa/ladspahelper.h | 4 | ||||
| -rw-r--r-- | src/plugins/Effect/stereo/stereoplugin.cpp | 12 | ||||
| -rw-r--r-- | src/plugins/Effect/stereo/stereoplugin.h | 4 |
9 files changed, 28 insertions, 28 deletions
diff --git a/src/plugins/Effect/Effect.pro b/src/plugins/Effect/Effect.pro index b073f08f3..336647a4b 100644 --- a/src/plugins/Effect/Effect.pro +++ b/src/plugins/Effect/Effect.pro @@ -1,15 +1,15 @@ include (../../../qmmp.pri) TEMPLATE = subdirs -#SUBDIRS += crossfade stereo +SUBDIRS += crossfade stereo contains(CONFIG, BS2B_PLUGIN){ -#SUBDIRS += bs2b +SUBDIRS += bs2b } unix { SUBDIRS += srconverter contains(CONFIG, LADSPA_PLUGIN){ -# SUBDIRS += ladspa + SUBDIRS += ladspa } } diff --git a/src/plugins/Effect/bs2b/bs2bplugin.cpp b/src/plugins/Effect/bs2b/bs2bplugin.cpp index 18ec681f3..252f3e0ff 100644 --- a/src/plugins/Effect/bs2b/bs2bplugin.cpp +++ b/src/plugins/Effect/bs2b/bs2bplugin.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009 by Ilya Kotov <forkotov02@hotmail.ru> * + * Copyright (C) 2009-2014 by Ilya Kotov <forkotov02@hotmail.ru> * * Copyright (C) 2009 by Sebastian Pipping <sebastian@pipping.org> * * * * This program is free software; you can redistribute it and/or modify * @@ -67,10 +67,10 @@ void Bs2bPlugin::applyEffect(Buffer *b) m_mutex.unlock(); } -void Bs2bPlugin::configure(quint32 freq, int chan, Qmmp::AudioFormat format) +void Bs2bPlugin::configure(quint32 freq, ChannelMap map, Qmmp::AudioFormat format) { - m_chan = chan; - Effect::configure(freq, chan, format); + m_chan = map.count(); + Effect::configure(freq, map, format); bs2b_set_srate(m_bs2b_handler,freq); } diff --git a/src/plugins/Effect/bs2b/bs2bplugin.h b/src/plugins/Effect/bs2b/bs2bplugin.h index b9b394e1a..8bb30f6b4 100644 --- a/src/plugins/Effect/bs2b/bs2bplugin.h +++ b/src/plugins/Effect/bs2b/bs2bplugin.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2010 by Ilya Kotov * + * Copyright (C) 2010-2014 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -36,7 +36,7 @@ public: virtual ~Bs2bPlugin(); void applyEffect(Buffer *b); - void configure(quint32 freq, int chan, Qmmp::AudioFormat format); + void configure(quint32 freq, ChannelMap map, Qmmp::AudioFormat format); void setCrossfeedLevel(uint32_t level); static Bs2bPlugin* instance(); diff --git a/src/plugins/Effect/crossfade/crossfadeplugin.cpp b/src/plugins/Effect/crossfade/crossfadeplugin.cpp index 6df0f3f0d..7176433ed 100644 --- a/src/plugins/Effect/crossfade/crossfadeplugin.cpp +++ b/src/plugins/Effect/crossfade/crossfadeplugin.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009 by Ilya Kotov <forkotov02@hotmail.ru> * + * Copyright (C) 2009-2014 by Ilya Kotov <forkotov02@hotmail.ru> * * Copyright (C) 2009 by Sebastian Pipping <sebastian@pipping.org> * * * * This program is free software; you can redistribute it and/or modify * @@ -101,9 +101,9 @@ void CrossfadePlugin::applyEffect(Buffer *b) return; } -void CrossfadePlugin::configure(quint32 freq, int chan, Qmmp::AudioFormat format) +void CrossfadePlugin::configure(quint32 freq, ChannelMap map, Qmmp::AudioFormat format) { - Effect::configure(freq, chan, format); + Effect::configure(freq, map, format); } void CrossfadePlugin::mix8(uchar *cur_buf, uchar *prev_buf, uint samples, double volume) diff --git a/src/plugins/Effect/crossfade/crossfadeplugin.h b/src/plugins/Effect/crossfade/crossfadeplugin.h index 340e10f83..065369b1b 100644 --- a/src/plugins/Effect/crossfade/crossfadeplugin.h +++ b/src/plugins/Effect/crossfade/crossfadeplugin.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2010 by Ilya Kotov * + * Copyright (C) 2010-2014 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -38,7 +38,7 @@ public: virtual ~CrossfadePlugin(); void applyEffect(Buffer *b); - void configure(quint32 freq, int chan, Qmmp::AudioFormat format); + void configure(quint32 freq, ChannelMap map, Qmmp::AudioFormat format); private: enum State diff --git a/src/plugins/Effect/ladspa/ladspahelper.cpp b/src/plugins/Effect/ladspa/ladspahelper.cpp index 81c2c416a..338f16757 100644 --- a/src/plugins/Effect/ladspa/ladspahelper.cpp +++ b/src/plugins/Effect/ladspa/ladspahelper.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009 by Ilya Kotov * + * Copyright (C) 2009-2014 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -36,8 +36,8 @@ void LADSPAHelper::applyEffect(Buffer *b) LADSPAHost::instance()->applyEffect((qint16 *)b->data, b->nbytes); } -void LADSPAHelper::configure(quint32 freq, int chan, Qmmp::AudioFormat format) +void LADSPAHelper::configure(quint32 freq, ChannelMap map, Qmmp::AudioFormat format) { - LADSPAHost::instance()->configure(freq,chan,format); - Effect::configure(freq, chan, format); + LADSPAHost::instance()->configure(freq,map.count(),format); + Effect::configure(freq, map, format); } diff --git a/src/plugins/Effect/ladspa/ladspahelper.h b/src/plugins/Effect/ladspa/ladspahelper.h index 273782e00..0ff749628 100644 --- a/src/plugins/Effect/ladspa/ladspahelper.h +++ b/src/plugins/Effect/ladspa/ladspahelper.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009 by Ilya Kotov * + * Copyright (C) 2009-2014 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -33,7 +33,7 @@ public: virtual ~LADSPAHelper(); void applyEffect(Buffer *b); - void configure(quint32 freq, int chan, Qmmp::AudioFormat format); + void configure(quint32 freq, ChannelMap map, Qmmp::AudioFormat format); }; #endif // LADSPAHELPER_H 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(); |
