diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2015-12-27 09:43:27 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2015-12-27 09:43:27 +0000 |
| commit | a904b3a5e97ad3568aae2591068fb7bd962779c0 (patch) | |
| tree | 65eb55999682e2c1f7b46225dcc0c6eff6bb310d /src/plugins/Effect/bs2b/bs2bplugin.cpp | |
| parent | e3e6c992d0100d84687105ad512ee524c2849e8f (diff) | |
| download | qmmp-a904b3a5e97ad3568aae2591068fb7bd962779c0.tar.gz qmmp-a904b3a5e97ad3568aae2591068fb7bd962779c0.tar.bz2 qmmp-a904b3a5e97ad3568aae2591068fb7bd962779c0.zip | |
enabled bs2b plugin
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@5897 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Effect/bs2b/bs2bplugin.cpp')
| -rw-r--r-- | src/plugins/Effect/bs2b/bs2bplugin.cpp | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/src/plugins/Effect/bs2b/bs2bplugin.cpp b/src/plugins/Effect/bs2b/bs2bplugin.cpp index 252f3e0ff..14c6f5db7 100644 --- a/src/plugins/Effect/bs2b/bs2bplugin.cpp +++ b/src/plugins/Effect/bs2b/bs2bplugin.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009-2014 by Ilya Kotov <forkotov02@hotmail.ru> * + * Copyright (C) 2009-2015 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 * @@ -41,36 +41,20 @@ Bs2bPlugin::~Bs2bPlugin() bs2b_close(m_bs2b_handler); } -#define CASE_BS2B(bitsPerSample, dataType, functionToCall, samples, out_data) \ - case bitsPerSample: \ - { \ - dataType * data = reinterpret_cast<dataType *>(out_data); \ - functionToCall(m_bs2b_handler, data, samples); \ - } \ - break; - void Bs2bPlugin::applyEffect(Buffer *b) { if(m_chan != 2) return; - uint samples = b->nbytes / audioParameters().sampleSize() / 2; + m_mutex.lock(); - switch (format()) - { - CASE_BS2B(Qmmp::PCM_S8, int8_t, bs2b_cross_feed_s8, samples, b->data) - CASE_BS2B(Qmmp::PCM_S16LE, int16_t, bs2b_cross_feed_s16le, samples, b->data) - //CASE_BS2B(Qmmp::PCM_S24LE, bs2b_int24_t, bs2b_cross_feed_s24le, samples, out_data) - CASE_BS2B(Qmmp::PCM_S32LE, int32_t, bs2b_cross_feed_s32le, samples, b->data) - default: - ; // noop - } + bs2b_cross_feed_f(m_bs2b_handler, b->data, b->samples/2); m_mutex.unlock(); } -void Bs2bPlugin::configure(quint32 freq, ChannelMap map, Qmmp::AudioFormat format) +void Bs2bPlugin::configure(quint32 freq, ChannelMap map) { m_chan = map.count(); - Effect::configure(freq, map, format); + Effect::configure(freq, map); bs2b_set_srate(m_bs2b_handler,freq); } |
