From 41f66e32ed817ac2da74f5d0e319fda6b02a6242 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sat, 28 Feb 2009 11:05:43 +0000 Subject: updated bs2b plugin. Now it uses updated bs2b library and enabled by default git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@810 90c681e8-e032-0410-971d-27865f9a5e38 --- CMakeLists.txt | 1 + README | 7 +- README.RUS | 7 +- qmmp.pri | 1 + src/plugins/Effect/CMakeLists.txt | 5 ++ src/plugins/Effect/Effect.pro | 8 +- src/plugins/Effect/bs2b/CMakeLists.txt | 71 ++++++++++++++++ src/plugins/Effect/bs2b/bs2b.pro | 39 +++++++++ src/plugins/Effect/bs2b/bs2bplugin.cpp | 73 ++++++++++++++++ src/plugins/Effect/bs2b/bs2bplugin.h | 45 ++++++++++ src/plugins/Effect/bs2b/effectbs2bfactory.cpp | 69 +++++++++++++++ src/plugins/Effect/bs2b/effectbs2bfactory.h | 46 ++++++++++ src/plugins/Effect/bs2b/settingsdialog.cpp | 53 ++++++++++++ src/plugins/Effect/bs2b/settingsdialog.h | 46 ++++++++++ src/plugins/Effect/bs2b/settingsdialog.ui | 99 ++++++++++++++++++++++ .../Effect/bs2b/translations/bs2b_plugin_cs.ts | 90 ++++++++++++++++++++ .../Effect/bs2b/translations/bs2b_plugin_de.ts | 90 ++++++++++++++++++++ .../Effect/bs2b/translations/bs2b_plugin_ru.ts | 90 ++++++++++++++++++++ .../Effect/bs2b/translations/bs2b_plugin_uk_UA.ts | 90 ++++++++++++++++++++ .../Effect/bs2b/translations/bs2b_plugin_zh_CN.ts | 90 ++++++++++++++++++++ .../Effect/bs2b/translations/bs2b_plugin_zh_TW.ts | 90 ++++++++++++++++++++ .../Effect/bs2b/translations/translations.qrc | 11 +++ 22 files changed, 1116 insertions(+), 5 deletions(-) create mode 100644 src/plugins/Effect/bs2b/CMakeLists.txt create mode 100644 src/plugins/Effect/bs2b/bs2b.pro create mode 100644 src/plugins/Effect/bs2b/bs2bplugin.cpp create mode 100644 src/plugins/Effect/bs2b/bs2bplugin.h create mode 100644 src/plugins/Effect/bs2b/effectbs2bfactory.cpp create mode 100644 src/plugins/Effect/bs2b/effectbs2bfactory.h create mode 100644 src/plugins/Effect/bs2b/settingsdialog.cpp create mode 100644 src/plugins/Effect/bs2b/settingsdialog.h create mode 100644 src/plugins/Effect/bs2b/settingsdialog.ui create mode 100644 src/plugins/Effect/bs2b/translations/bs2b_plugin_cs.ts create mode 100644 src/plugins/Effect/bs2b/translations/bs2b_plugin_de.ts create mode 100644 src/plugins/Effect/bs2b/translations/bs2b_plugin_ru.ts create mode 100644 src/plugins/Effect/bs2b/translations/bs2b_plugin_uk_UA.ts create mode 100644 src/plugins/Effect/bs2b/translations/bs2b_plugin_zh_CN.ts create mode 100644 src/plugins/Effect/bs2b/translations/bs2b_plugin_zh_TW.ts create mode 100644 src/plugins/Effect/bs2b/translations/translations.qrc diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a8bc7c63..a918aff79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,6 +101,7 @@ PRINT_SUMMARY ("PulseAudio support ................" USE_PULSE PULSE_FOUND) MESSAGE("") MESSAGE("Effect Plugins:") PRINT_SUMMARY ("Sample Rate Conversion ............" USE_SRC SAMPLERATE_FOUND) +PRINT_SUMMARY ("BS2B Plugin........................" USE_BS2B BS2B_FOUND) MESSAGE("") MESSAGE("Visual Plugins:") diff --git a/README b/README index 753c47bad..82de748fd 100644 --- a/README +++ b/README @@ -23,9 +23,11 @@ Main opportunities: - Last.fm scrobbler - Spectrum Analyzer - sample rate conversion +- bs2b dsp effect - streaming support (MP3, Vorbis via IceCast/ShoutCast) - device detection - MPRIS support +- global hotkey support - video playback using Mplayer - lyrics support (from LyricWiki.org) @@ -50,6 +52,7 @@ Requirements: - ffmpeg >= 0.4.9-pre1 (Optional) - cdio >= 0.80 (Optional) - faad2 >= 2.6.1 (Optional) +- libbs2b >= 2.2.1 (Optional) - cmake >= 2.4.8 (for build only) @@ -70,8 +73,8 @@ cmake ./ -D USE_JACK:BOOL=FALSE Available options: USE_MAD, USE_FLAC, USE_VORBIS, USE_MPC, USE_MODPLUG, USE_SNDFILE, USE_WAVPACK, USE_FFMPEG, USE_AAC, -USE_CUE, USE_MPLAYER, USE_CDA, USE_ALSA, USE_OSS, USE_JACK, USE_PULSE, USE_SRC, USE_ANALYZER, USE_MPRIS, -USE_SCROBBLER, USE_STATICON, USE_NOTIFIER, USE_LYRICS, USE_HAL, USE_QMMP_DIALOG +USE_CUE, USE_MPLAYER, USE_CDA, USE_ALSA, USE_OSS, USE_JACK, USE_PULSE, USE_SRC, USE_BS2B, USE_ANALYZER, USE_MPRIS, +USE_SCROBBLER, USE_STATICON, USE_NOTIFIER, USE_LYRICS, USE_HAL, USE_HOTKEY, USE_QMMP_DIALOG Also you can use ccmake for changing plugins configuration. By default program will be installed in /usr/local. You can change default path by running: diff --git a/README.RUS b/README.RUS index 1b9f25fb2..2f6ca2e03 100644 --- a/README.RUS +++ b/README.RUS @@ -23,9 +23,11 @@ Qmmp - Qt-based multimedia player - скробблер Last.fm - анализатор спектра - передискретизация +- эффект bs2b - поддержка потокового вещания (MP3, Vorbis через IceCast/ShoutCast) - определение устройств - поддержка MPRIS +- поддержка глобальных клавиш - поддержка видео с помощью Mplayer - получение текстов песен с LyricWiki.org @@ -50,6 +52,7 @@ Qmmp - Qt-based multimedia player - ffmpeg >= 0.4.9-pre1 (Опционально) - cdio >= 0.80 (Опционально) - faad2 >= 2.6.1 (Опционально) +- libbs2b >= 2.2.1 (Опционально) - cmake >= 2.4.8 (только для сборки) Внимание! Для сборки Qmmp нужна утилита lrelease. Очень часто она находится в пакете qt4-linguist. @@ -68,8 +71,8 @@ cmake ./ -D USE_JACK:BOOL=FALSE Доступные опции: USE_MAD, USE_FLAC, USE_VORBIS, USE_MPC, USE_MODPLUG, USE_SNDFILE, USE_WAVPACK, USE_FFMPEG, USE_AAC, -USE_CUE, USE_MPLAYER, USE_CDA, USE_ALSA, USE_OSS, USE_JACK, USE_PULSE, USE_SRC, USE_ANALYZER, USE_MPRIS, -USE_SCROBBLER, USE_STATICON, USE_NOTIFIER, USE_LYRICS, USE_HAL, USE_QMMP_DIALOG +USE_CUE, USE_MPLAYER, USE_CDA, USE_ALSA, USE_OSS, USE_JACK, USE_PULSE, USE_SRC, USE_BS2B, USE_ANALYZER, USE_MPRIS, +USE_SCROBBLER, USE_STATICON, USE_NOTIFIER, USE_LYRICS, USE_HAL, USE_HOTKEY, USE_QMMP_DIALOG Также вы можете использовать ccmake для изменения конфигурации модулей. По умолчанию программа будет установлена в /usr/local. Вы можете изменить этот путь командой: diff --git a/qmmp.pri b/qmmp.pri index 4b5a206b4..60801d6b1 100644 --- a/qmmp.pri +++ b/qmmp.pri @@ -24,3 +24,4 @@ CONFIG += ALSA_PLUGIN CONFIG += AAC_PLUGIN CONFIG += MPLAYER_PLUGIN CONFIG += CDAUDIO_PLUGIN +CONFIG += BS2B_PLUGIN diff --git a/src/plugins/Effect/CMakeLists.txt b/src/plugins/Effect/CMakeLists.txt index d2303428b..fcd9a8a88 100644 --- a/src/plugins/Effect/CMakeLists.txt +++ b/src/plugins/Effect/CMakeLists.txt @@ -1,5 +1,10 @@ SET(USE_SRC TRUE CACHE BOOL "enable/disable SRC plugin") +SET(USE_BS2B TRUE CACHE BOOL "enable/disable bs2b plugin") IF(USE_SRC) add_subdirectory(srconverter) ENDIF(USE_SRC) + +IF(USE_BS2B) +add_subdirectory(bs2b) +ENDIF(USE_BS2B) diff --git a/src/plugins/Effect/Effect.pro b/src/plugins/Effect/Effect.pro index b03c8a598..50c42609d 100644 --- a/src/plugins/Effect/Effect.pro +++ b/src/plugins/Effect/Effect.pro @@ -1,4 +1,10 @@ +include (../../../qmmp.pri) TEMPLATE = subdirs SUBDIRS += srconverter - +contains(CONFIG, BS2B_PLUGIN){ +message(***********************) +message(* BS2B plugin enabled *) +message(***********************) +SUBDIRS += bs2b +} diff --git a/src/plugins/Effect/bs2b/CMakeLists.txt b/src/plugins/Effect/bs2b/CMakeLists.txt new file mode 100644 index 000000000..57f5f44d5 --- /dev/null +++ b/src/plugins/Effect/bs2b/CMakeLists.txt @@ -0,0 +1,71 @@ +project(libbs2b) + +cmake_minimum_required(VERSION 2.4.7) + +if(COMMAND cmake_policy) +cmake_policy(SET CMP0003 NEW) +endif(COMMAND cmake_policy) + +# qt plugin +ADD_DEFINITIONS( -Wall ) +ADD_DEFINITIONS(${QT_DEFINITIONS}) +ADD_DEFINITIONS(-DQT_PLUGIN) +ADD_DEFINITIONS(-DQT_NO_DEBUG) +ADD_DEFINITIONS(-DQT_SHARED) +ADD_DEFINITIONS(-DQT_THREAD) + +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + +SET(QT_INCLUDES + ${QT_INCLUDES} + ${CMAKE_CURRENT_SOURCE_DIR}/../../../ +) + +# libqmmp +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../) +link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmp) + +pkg_check_modules(SAMPLERATE samplerate) + +include_directories(${BS2B_INCLUDE_DIRS}) +link_directories(${BS2B_LIBRARY_DIRS}) + +SET(libbs2b_SRCS + bs2bplugin.cpp + settingsdialog.cpp + effectbs2bfactory.cpp +) + +SET(libbs2b_MOC_HDRS + bs2bplugin.h + settingsdialog.h + effectbs2bfactory.h +) + +SET(libbs2b_RCCS translations/translations.qrc) + +QT4_ADD_RESOURCES(libbs2b_RCC_SRCS ${libbs2b_RCCS}) + +QT4_WRAP_CPP(libbs2b_MOC_SRCS ${libbs2b_MOC_HDRS}) + +pkg_search_module(BS2B libbs2b) + +# user interface + + +SET(libbs2b_UIS + settingsdialog.ui +) + +QT4_WRAP_UI(libbs2b_UIS_H ${libbs2b_UIS}) +# Don't forget to include output directory, otherwise +# the UI file won't be wrapped! +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + +IF(BS2B_FOUND) +ADD_LIBRARY(bs2b SHARED ${libbs2b_SRCS} ${libbs2b_MOC_SRCS} ${libbs2b_UIS_H} + ${libbs2b_RCC_SRCS}) +add_dependencies(bs2b qmmp) +target_link_libraries(bs2b ${QT_LIBRARIES} -lqmmp ${BS2B_LDFLAGS} ${BS2B_CFLAGS}) +install(TARGETS bs2b DESTINATION ${LIB_DIR}/qmmp/Effect) +ENDIF(BS2B_FOUND) diff --git a/src/plugins/Effect/bs2b/bs2b.pro b/src/plugins/Effect/bs2b/bs2b.pro new file mode 100644 index 000000000..ed7af50cb --- /dev/null +++ b/src/plugins/Effect/bs2b/bs2b.pro @@ -0,0 +1,39 @@ +include(../../plugins.pri) + +HEADERS += bs2bplugin.h \ + effectbs2bfactory.h \ + settingsdialog.h + +SOURCES += bs2bplugin.cpp \ + effectbs2bfactory.cpp \ + settingsdialog.cpp + +TARGET =$$PLUGINS_PREFIX/Effect/bs2b +QMAKE_CLEAN =$$PLUGINS_PREFIX/Effect/libbs2b.so +INCLUDEPATH += ../../../ +CONFIG += release \ +warn_on \ +plugin \ +link_pkgconfig + +PKGCONFIG += libbs2b +TEMPLATE = lib +QMAKE_LIBDIR += ../../../../lib +LIBS += -lqmmp -L/usr/lib -I/usr/include + +TRANSLATIONS = translations/bs2b_plugin_cs.ts \ + translations/bs2b_plugin_de.ts \ + translations/bs2b_plugin_zh_CN.ts \ + translations/bs2b_plugin_zh_TW.ts \ + translations/bs2b_plugin_uk_UA.ts \ + translations/bs2b_plugin_ru.ts +RESOURCES = translations/translations.qrc + +isEmpty(LIB_DIR){ + LIB_DIR = /lib +} +target.path = $$LIB_DIR/qmmp/Effect +INSTALLS += target + + +FORMS += settingsdialog.ui diff --git a/src/plugins/Effect/bs2b/bs2bplugin.cpp b/src/plugins/Effect/bs2b/bs2bplugin.cpp new file mode 100644 index 000000000..59a9faad2 --- /dev/null +++ b/src/plugins/Effect/bs2b/bs2bplugin.cpp @@ -0,0 +1,73 @@ +/*************************************************************************** + * Copyright (C) 2009 by Ilya Kotov * + * Copyright (C) 2009 by Sebastian Pipping * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include +#include +#include +#include +#include "bs2bplugin.h" + +Bs2bPlugin::Bs2bPlugin(QObject* parent) : Effect(parent) +{ + m_bs2b_handler = bs2b_open(); + QSettings settings(Qmmp::configFile(), QSettings::IniFormat); + bs2b_set_level(m_bs2b_handler, settings.value("bs2b/level", BS2B_DEFAULT_CLEVEL).toInt()); +} + +Bs2bPlugin::~Bs2bPlugin() +{ + bs2b_clear(m_bs2b_handler); +} + +#define CASE_BS2B(bitsPerSample, dataType, functionToCall, samples, out_data) \ + case bitsPerSample: \ + { \ + dataType * data = reinterpret_cast(*out_data); \ + while (samples--) { \ + functionToCall(m_bs2b_handler, data); \ + data += 2; \ + } \ + } \ + break; + +ulong Bs2bPlugin::process(char *in_data, const ulong size, char **out_data) +{ + memcpy(*out_data, in_data, size); + if (channels() != 2) + return size; + + uint samples = size / (bitsPerSample() / 8) / 2; + switch (bitsPerSample()) + { + CASE_BS2B(8, char, bs2b_cross_feed_s8, samples, out_data) + CASE_BS2B(16, short, bs2b_cross_feed_16, samples, out_data) + CASE_BS2B(32, long, bs2b_cross_feed_32, samples, out_data) + default: + ; // noop + } + return size; +} + +void Bs2bPlugin::configure(quint32 freq, int chan, int res) +{ + Effect::configure(freq, chan, res); + bs2b_set_srate(m_bs2b_handler,freq); + bs2b_set_level(m_bs2b_handler, BS2B_DEFAULT_CLEVEL); +} diff --git a/src/plugins/Effect/bs2b/bs2bplugin.h b/src/plugins/Effect/bs2b/bs2bplugin.h new file mode 100644 index 000000000..1ac94323f --- /dev/null +++ b/src/plugins/Effect/bs2b/bs2bplugin.h @@ -0,0 +1,45 @@ +/*************************************************************************** + * Copyright (C) 2009 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef BS2BPLUGIN_H +#define BS2BPLUGIN_H + +#include +#include + +/** + @author Ilya Kotov +*/ + +class Bs2bPlugin : public Effect +{ + Q_OBJECT +public: + Bs2bPlugin(QObject *parent = 0); + + virtual ~Bs2bPlugin(); + + ulong process(char *in_data, const ulong size, char **out_data); + void configure(quint32 freq, int chan, int res); + +private: + t_bs2bdp m_bs2b_handler; +}; + +#endif diff --git a/src/plugins/Effect/bs2b/effectbs2bfactory.cpp b/src/plugins/Effect/bs2b/effectbs2bfactory.cpp new file mode 100644 index 000000000..b594b41d1 --- /dev/null +++ b/src/plugins/Effect/bs2b/effectbs2bfactory.cpp @@ -0,0 +1,69 @@ +/*************************************************************************** + * Copyright (C) 2009 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include +#include +#include "effectbs2bfactory.h" +#include "settingsdialog.h" +#include "bs2bplugin.h" + +const EffectProperties EffectBs2bFactory::properties() const +{ + EffectProperties properties; + properties.name = tr("BS2B Plugin"); + properties.shortName = "bs2b"; + properties.hasSettings = TRUE; + properties.hasAbout = TRUE; + return properties; +}; + +Effect *EffectBs2bFactory::create(QObject *parent) +{ + return new Bs2bPlugin(parent); +}; + +void EffectBs2bFactory::showSettings(QWidget *parent) +{ + SettingsDialog *s = new SettingsDialog(parent); + s ->show(); +}; + +void EffectBs2bFactory::showAbout(QWidget *parent) +{ + QMessageBox::about (parent, tr("About BS2B Effect Plugin"), + "

"+tr("This is the Qmmp plugin version of Boris Mikhaylov's headphone DSP " + "effect \"Bauer stereophonic-to-binaural\", abbreviated bs2b.")+"

"+ + QString("

" + tr("Visit %1 for more details")+"

") + .arg("http://bs2b.sourceforge.net/")+ + QString("

" + tr("Compiled against libbs2b-%1") + "

").arg(BS2B_VERSION_STR)+ + "

"+tr("Developers:")+"
"+ + tr("Ilya Kotov") + " <forkotov02@hotmail.ru>"+"
"+ + tr("Sebastian Pipping") + " <sebastian@pipping.org>"+"

"); +}; + +QTranslator *EffectBs2bFactory::createTranslator(QObject *parent) +{ + QTranslator *translator = new QTranslator(parent); + QString locale = QLocale::system().name(); + translator->load(QString(":/bs2b_plugin_") + locale); + return translator; +}; + +Q_EXPORT_PLUGIN(EffectBs2bFactory) diff --git a/src/plugins/Effect/bs2b/effectbs2bfactory.h b/src/plugins/Effect/bs2b/effectbs2bfactory.h new file mode 100644 index 000000000..231315605 --- /dev/null +++ b/src/plugins/Effect/bs2b/effectbs2bfactory.h @@ -0,0 +1,46 @@ +/*************************************************************************** + * Copyright (C) 2009 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef EFFECTBS2BFACTORY_H +#define EFFECTBS2BFACTORY_H + + +#include + +#include +#include + +/** + @author Ilya Kotov +*/ +class EffectBs2bFactory : public QObject, public EffectFactory +{ +Q_OBJECT +Q_INTERFACES(EffectFactory); + +public: + const EffectProperties properties() const; + Effect *create(QObject *parent); + void showSettings(QWidget *parent); + void showAbout(QWidget *parent); + QTranslator *createTranslator(QObject *parent); +}; + + +#endif diff --git a/src/plugins/Effect/bs2b/settingsdialog.cpp b/src/plugins/Effect/bs2b/settingsdialog.cpp new file mode 100644 index 000000000..1030815e5 --- /dev/null +++ b/src/plugins/Effect/bs2b/settingsdialog.cpp @@ -0,0 +1,53 @@ +/*************************************************************************** + * Copyright (C) 2009 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include +#include +#include + +#include "settingsdialog.h" + +SettingsDialog::SettingsDialog(QWidget *parent) + : QDialog(parent) +{ + ui.setupUi(this); + setAttribute(Qt::WA_DeleteOnClose, TRUE); + QSettings settings(Qmmp::configFile(), QSettings::IniFormat); + ui.levelComboBox->addItem (tr("low"), BS2B_LOW_CLEVEL); + ui.levelComboBox->addItem (tr("middle"), BS2B_MIDDLE_CLEVEL); + ui.levelComboBox->addItem (tr("high"), BS2B_HIGH_CLEVEL); + ui.levelComboBox->addItem (tr("low (easy version)"), BS2B_LOW_ECLEVEL); + ui.levelComboBox->addItem (tr("middle (easy version)"), BS2B_MIDDLE_ECLEVEL); + ui.levelComboBox->addItem (tr("hight (easy version)"), BS2B_HIGH_ECLEVEL); + int index = ui.levelComboBox->findData(settings.value("bs2b/level", BS2B_DEFAULT_CLEVEL).toInt()); + if (index >= 0) + ui.levelComboBox->setCurrentIndex(index); +} + +SettingsDialog::~SettingsDialog() +{ +} + +void SettingsDialog::accept() +{ + QSettings settings(Qmmp::configFile(), QSettings::IniFormat); + settings.setValue("bs2b/level", ui.levelComboBox->itemData(ui.levelComboBox->currentIndex()).toInt()); + QDialog::accept(); +} diff --git a/src/plugins/Effect/bs2b/settingsdialog.h b/src/plugins/Effect/bs2b/settingsdialog.h new file mode 100644 index 000000000..0cc842fb4 --- /dev/null +++ b/src/plugins/Effect/bs2b/settingsdialog.h @@ -0,0 +1,46 @@ +/*************************************************************************** + * Copyright (C) 2008 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef SETTINGSDIALOG_H +#define SETTINGSDIALOG_H + +#include + +#include "ui_settingsdialog.h" + +/** + @author Ilya Kotov +*/ +class SettingsDialog : public QDialog +{ +Q_OBJECT +public: + SettingsDialog(QWidget *parent = 0); + + ~SettingsDialog(); + +public slots: + virtual void accept(); + +private: + Ui::SettingsDialog ui; + +}; + +#endif diff --git a/src/plugins/Effect/bs2b/settingsdialog.ui b/src/plugins/Effect/bs2b/settingsdialog.ui new file mode 100644 index 000000000..72f54da02 --- /dev/null +++ b/src/plugins/Effect/bs2b/settingsdialog.ui @@ -0,0 +1,99 @@ + + + SettingsDialog + + + + 0 + 0 + 293 + 69 + + + + BS2B Plugin Settings + + + + 6 + + + 6 + + + 6 + + + + + Crossfeed level: + + + + + + + + + + Qt::Horizontal + + + + 228 + 24 + + + + + + + + + 0 + 0 + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + SettingsDialog + accept() + + + 270 + 76 + + + 91 + 88 + + + + + buttonBox + rejected() + SettingsDialog + reject() + + + 326 + 78 + + + 139 + 60 + + + + + diff --git a/src/plugins/Effect/bs2b/translations/bs2b_plugin_cs.ts b/src/plugins/Effect/bs2b/translations/bs2b_plugin_cs.ts new file mode 100644 index 000000000..19ebc91b1 --- /dev/null +++ b/src/plugins/Effect/bs2b/translations/bs2b_plugin_cs.ts @@ -0,0 +1,90 @@ + + + + + EffectBs2bFactory + + + BS2B Plugin + + + + + About BS2B Effect Plugin + + + + + This is the Qmmp plugin version of Boris Mikhaylov's headphone DSP effect "Bauer stereophonic-to-binaural", abbreviated bs2b. + + + + + Visit %1 for more details + + + + + Compiled against libbs2b-%1 + + + + + Developers: + + + + + Ilya Kotov + + + + + Sebastian Pipping + + + + + SettingsDialog + + + low + + + + + middle + + + + + high + + + + + low (easy version) + + + + + middle (easy version) + + + + + hight (easy version) + + + + + BS2B Plugin Settings + + + + + Crossfeed level: + + + + diff --git a/src/plugins/Effect/bs2b/translations/bs2b_plugin_de.ts b/src/plugins/Effect/bs2b/translations/bs2b_plugin_de.ts new file mode 100644 index 000000000..19ebc91b1 --- /dev/null +++ b/src/plugins/Effect/bs2b/translations/bs2b_plugin_de.ts @@ -0,0 +1,90 @@ + + + + + EffectBs2bFactory + + + BS2B Plugin + + + + + About BS2B Effect Plugin + + + + + This is the Qmmp plugin version of Boris Mikhaylov's headphone DSP effect "Bauer stereophonic-to-binaural", abbreviated bs2b. + + + + + Visit %1 for more details + + + + + Compiled against libbs2b-%1 + + + + + Developers: + + + + + Ilya Kotov + + + + + Sebastian Pipping + + + + + SettingsDialog + + + low + + + + + middle + + + + + high + + + + + low (easy version) + + + + + middle (easy version) + + + + + hight (easy version) + + + + + BS2B Plugin Settings + + + + + Crossfeed level: + + + + diff --git a/src/plugins/Effect/bs2b/translations/bs2b_plugin_ru.ts b/src/plugins/Effect/bs2b/translations/bs2b_plugin_ru.ts new file mode 100644 index 000000000..c6ed80e0a --- /dev/null +++ b/src/plugins/Effect/bs2b/translations/bs2b_plugin_ru.ts @@ -0,0 +1,90 @@ + + + + + EffectBs2bFactory + + + BS2B Plugin + Модуль BS2B + + + + About BS2B Effect Plugin + О модуле эффектов BS2B + + + + This is the Qmmp plugin version of Boris Mikhaylov's headphone DSP effect "Bauer stereophonic-to-binaural", abbreviated bs2b. + Этот модуль добавляет эффект "Bauer stereophonic-to-binaural" (сокращённо bs2b) Бориса Михайлова. + + + + Visit %1 for more details + Для получения информации посетите %1 + + + + Compiled against libbs2b-%1 + Собрано с libbs2b-%1 + + + + Developers: + Разработчики: + + + + Ilya Kotov + Илья Котов + + + + Sebastian Pipping + + + + + SettingsDialog + + + low + низкий + + + + middle + средний + + + + high + высокий + + + + low (easy version) + низкий (упрощённая версия) + + + + middle (easy version) + средний (упрощённая версия) + + + + hight (easy version) + высокий (упрощённая версия) + + + + BS2B Plugin Settings + Настройки модуля BS2B + + + + Crossfeed level: + Уровень взаимосмешения: + + + diff --git a/src/plugins/Effect/bs2b/translations/bs2b_plugin_uk_UA.ts b/src/plugins/Effect/bs2b/translations/bs2b_plugin_uk_UA.ts new file mode 100644 index 000000000..19ebc91b1 --- /dev/null +++ b/src/plugins/Effect/bs2b/translations/bs2b_plugin_uk_UA.ts @@ -0,0 +1,90 @@ + + + + + EffectBs2bFactory + + + BS2B Plugin + + + + + About BS2B Effect Plugin + + + + + This is the Qmmp plugin version of Boris Mikhaylov's headphone DSP effect "Bauer stereophonic-to-binaural", abbreviated bs2b. + + + + + Visit %1 for more details + + + + + Compiled against libbs2b-%1 + + + + + Developers: + + + + + Ilya Kotov + + + + + Sebastian Pipping + + + + + SettingsDialog + + + low + + + + + middle + + + + + high + + + + + low (easy version) + + + + + middle (easy version) + + + + + hight (easy version) + + + + + BS2B Plugin Settings + + + + + Crossfeed level: + + + + diff --git a/src/plugins/Effect/bs2b/translations/bs2b_plugin_zh_CN.ts b/src/plugins/Effect/bs2b/translations/bs2b_plugin_zh_CN.ts new file mode 100644 index 000000000..19ebc91b1 --- /dev/null +++ b/src/plugins/Effect/bs2b/translations/bs2b_plugin_zh_CN.ts @@ -0,0 +1,90 @@ + + + + + EffectBs2bFactory + + + BS2B Plugin + + + + + About BS2B Effect Plugin + + + + + This is the Qmmp plugin version of Boris Mikhaylov's headphone DSP effect "Bauer stereophonic-to-binaural", abbreviated bs2b. + + + + + Visit %1 for more details + + + + + Compiled against libbs2b-%1 + + + + + Developers: + + + + + Ilya Kotov + + + + + Sebastian Pipping + + + + + SettingsDialog + + + low + + + + + middle + + + + + high + + + + + low (easy version) + + + + + middle (easy version) + + + + + hight (easy version) + + + + + BS2B Plugin Settings + + + + + Crossfeed level: + + + + diff --git a/src/plugins/Effect/bs2b/translations/bs2b_plugin_zh_TW.ts b/src/plugins/Effect/bs2b/translations/bs2b_plugin_zh_TW.ts new file mode 100644 index 000000000..19ebc91b1 --- /dev/null +++ b/src/plugins/Effect/bs2b/translations/bs2b_plugin_zh_TW.ts @@ -0,0 +1,90 @@ + + + + + EffectBs2bFactory + + + BS2B Plugin + + + + + About BS2B Effect Plugin + + + + + This is the Qmmp plugin version of Boris Mikhaylov's headphone DSP effect "Bauer stereophonic-to-binaural", abbreviated bs2b. + + + + + Visit %1 for more details + + + + + Compiled against libbs2b-%1 + + + + + Developers: + + + + + Ilya Kotov + + + + + Sebastian Pipping + + + + + SettingsDialog + + + low + + + + + middle + + + + + high + + + + + low (easy version) + + + + + middle (easy version) + + + + + hight (easy version) + + + + + BS2B Plugin Settings + + + + + Crossfeed level: + + + + diff --git a/src/plugins/Effect/bs2b/translations/translations.qrc b/src/plugins/Effect/bs2b/translations/translations.qrc new file mode 100644 index 000000000..732c289e1 --- /dev/null +++ b/src/plugins/Effect/bs2b/translations/translations.qrc @@ -0,0 +1,11 @@ + + + + bs2b_plugin_cs.qm + bs2b_plugin_de.qm + bs2b_plugin_zh_CN.qm + bs2b_plugin_zh_TW.qm + bs2b_plugin_uk_UA.qm + bs2b_plugin_ru.qm + + -- cgit v1.2.3-13-gbd6f