aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Output/oss4
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/Output/oss4')
-rw-r--r--src/plugins/Output/oss4/CMakeLists.txt97
-rw-r--r--src/plugins/Output/oss4/oss4.pro50
-rw-r--r--src/plugins/Output/oss4/outputoss4.cpp241
-rw-r--r--src/plugins/Output/oss4/outputoss4.h73
-rw-r--r--src/plugins/Output/oss4/outputoss4factory.cpp69
-rw-r--r--src/plugins/Output/oss4/outputoss4factory.h47
-rw-r--r--src/plugins/Output/oss4/settingsdialog.cpp110
-rw-r--r--src/plugins/Output/oss4/settingsdialog.h46
-rw-r--r--src/plugins/Output/oss4/settingsdialog.ui93
-rw-r--r--src/plugins/Output/oss4/translations/oss4_plugin_cs.ts45
-rw-r--r--src/plugins/Output/oss4/translations/oss4_plugin_de.ts45
-rw-r--r--src/plugins/Output/oss4/translations/oss4_plugin_es.ts45
-rw-r--r--src/plugins/Output/oss4/translations/oss4_plugin_it.ts45
-rw-r--r--src/plugins/Output/oss4/translations/oss4_plugin_ja.ts45
-rw-r--r--src/plugins/Output/oss4/translations/oss4_plugin_lt.ts45
-rw-r--r--src/plugins/Output/oss4/translations/oss4_plugin_nl.ts45
-rw-r--r--src/plugins/Output/oss4/translations/oss4_plugin_pl.ts45
-rw-r--r--src/plugins/Output/oss4/translations/oss4_plugin_ru.ts45
-rw-r--r--src/plugins/Output/oss4/translations/oss4_plugin_tr.ts45
-rw-r--r--src/plugins/Output/oss4/translations/oss4_plugin_uk_UA.ts45
-rw-r--r--src/plugins/Output/oss4/translations/oss4_plugin_zh_CN.ts45
-rw-r--r--src/plugins/Output/oss4/translations/oss4_plugin_zh_TW.ts45
-rw-r--r--src/plugins/Output/oss4/translations/translations.qrc18
23 files changed, 1429 insertions, 0 deletions
diff --git a/src/plugins/Output/oss4/CMakeLists.txt b/src/plugins/Output/oss4/CMakeLists.txt
new file mode 100644
index 000000000..bcedcaada
--- /dev/null
+++ b/src/plugins/Output/oss4/CMakeLists.txt
@@ -0,0 +1,97 @@
+project(liboss4)
+
+cmake_minimum_required(VERSION 2.4.7)
+
+if(COMMAND cmake_policy)
+cmake_policy(SET CMP0003 NEW)
+endif(COMMAND cmake_policy)
+
+INCLUDE(CheckIncludeFile)
+INCLUDE(CheckCXXSourceCompiles)
+
+# 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}/../../../
+)
+#oss4
+include_directories(/usr/lib/oss/include)
+CHECK_INCLUDE_FILE(sys/soundcard.h SYS_SOUNDCARD_H_FOUND)
+IF(SYS_SOUNDCARD_H_FOUND)
+ADD_DEFINITIONS(-DHAVE_SYS_SOUNDCARD_H)
+SET(CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_SOUNDCARD_H)
+ENDIF(SYS_SOUNDCARD_H_FOUND)
+
+
+SET(CMAKE_REQUIRED_INCLUDES /usr/lib/oss/include/ /usr/include/)
+
+CHECK_CXX_SOURCE_COMPILES("
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef HAVE_SYS_SOUNDCARD_H
+#include <sys/soundcard.h>
+#else
+#include <soundcard.h>
+#endif
+
+#if OSS_VERSION < 0x040000
+#error \\\"oss test failed\\\"
+#endif
+
+
+int main (int argc, char **argv)
+{
+ exit(0);
+}" OSS4_SUPPORT)
+
+IF(OSS4_SUPPORT)
+SET(OSS4_FOUND TRUE CACHE INTERNAL "oss4")
+ENDIF(OSS4_SUPPORT)
+
+
+# libqmmp
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../)
+link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmp)
+
+
+SET(liboss4_SRCS
+ outputoss4factory.cpp
+ outputoss4.cpp
+ settingsdialog.cpp
+)
+
+SET(liboss4_MOC_HDRS
+ outputoss4factory.h
+ outputoss4.h
+ settingsdialog.h
+)
+
+SET(liboss4_RCCS translations/translations.qrc)
+
+QT4_ADD_RESOURCES(liboss4_RCC_SRCS ${liboss4_RCCS})
+
+QT4_WRAP_CPP(liboss4_MOC_SRCS ${liboss4_MOC_HDRS})
+
+SET(liboss4_UIS
+ settingsdialog.ui
+)
+
+IF(OSS4_FOUND)
+QT4_WRAP_UI(liboss4_UIS_H ${liboss4_UIS})
+
+ADD_LIBRARY(oss4 MODULE ${liboss4_SRCS} ${liboss4_MOC_SRCS} ${liboss4_UIS_H}
+ ${liboss4_RCC_SRCS})
+add_dependencies(oss4 qmmp)
+target_link_libraries(oss4 ${QT_LIBRARIES} -lqmmp)
+install(TARGETS oss4 DESTINATION ${LIB_DIR}/qmmp/Output)
+ENDIF(OSS4_FOUND)
diff --git a/src/plugins/Output/oss4/oss4.pro b/src/plugins/Output/oss4/oss4.pro
new file mode 100644
index 000000000..4103902ba
--- /dev/null
+++ b/src/plugins/Output/oss4/oss4.pro
@@ -0,0 +1,50 @@
+include(../../plugins.pri)
+FORMS += settingsdialog.ui
+
+HEADERS += outputoss4factory.h \
+ outputoss4.h \
+ settingsdialog.h
+
+
+SOURCES += outputoss4factory.cpp \
+ outputoss4.cpp \
+ settingsdialog.cpp
+
+TARGET=$$PLUGINS_PREFIX/Output/oss
+QMAKE_CLEAN =$$PLUGINS_PREFIX/Output/liboss4.so
+
+
+INCLUDEPATH += ../../../
+QMAKE_LIBDIR += ../../../../lib
+CONFIG += release \
+warn_on \
+thread \
+plugin
+
+DEFINES += HAVE_SYS_SOUNDCARD_H
+INCLUDEPATH += /usr/lib/oss/include
+
+TEMPLATE = lib
+LIBS += -lqmmp
+
+TRANSLATIONS = translations/oss4_plugin_cs.ts \
+ translations/oss4_plugin_de.ts \
+ translations/oss4_plugin_zh_CN.ts \
+ translations/oss4_plugin_zh_TW.ts \
+ translations/oss4_plugin_ru.ts \
+ translations/oss4_plugin_pl.ts \
+ translations/oss4_plugin_uk_UA.ts \
+ translations/oss4_plugin_it.ts \
+ translations/oss4_plugin_tr.ts \
+ translations/oss4_plugin_lt.ts \
+ translations/oss4_plugin_nl.ts \
+ translations/oss4_plugin_ja.ts \
+ translations/oss4_plugin_es.ts \
+
+RESOURCES = translations/translations.qrc
+isEmpty (LIB_DIR){
+LIB_DIR = /lib
+}
+
+target.path = $$LIB_DIR/qmmp/Output
+INSTALLS += target
diff --git a/src/plugins/Output/oss4/outputoss4.cpp b/src/plugins/Output/oss4/outputoss4.cpp
new file mode 100644
index 000000000..d9c46f2b6
--- /dev/null
+++ b/src/plugins/Output/oss4/outputoss4.cpp
@@ -0,0 +1,241 @@
+/***************************************************************************
+ * Copyright (C) 2010 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 <QApplication>
+#include <QSettings>
+#include <QDir>
+
+extern "C"
+{
+#ifdef HAVE_SYS_SOUNDCARD_H
+#include <sys/soundcard.h>
+#else
+#include <soundcard.h>
+#endif
+//#include </usr/lib/oss/include/sys/soundcard.h>
+}
+
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <iostream>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/time.h>
+#include <qmmp/buffer.h>
+#include <qmmp/visual.h>
+#include "outputoss4.h"
+
+
+OutputOSS4 *OutputOSS4::m_instance = 0;
+
+OutputOSS4::OutputOSS4(QObject *parent) : Output(parent)
+{
+ m_do_select = true;
+ m_audio_fd = -1;
+ QSettings settings(Qmmp::configFile(), QSettings::IniFormat);
+ m_audio_device = settings.value("OSS4/device", DEFAULT_DEV).toString();
+ m_instance = this;
+}
+
+OutputOSS4::~OutputOSS4()
+{
+ if (m_audio_fd >= 0)
+ {
+ ioctl(m_audio_fd, SNDCTL_DSP_RESET, 0);
+ close(m_audio_fd);
+ m_audio_fd = -1;
+ }
+ m_instance = 0;
+}
+
+void OutputOSS4::configure(quint32 freq, int chan, Qmmp::AudioFormat format)
+{
+ int p;
+ switch (format)
+ {
+ case Qmmp::PCM_S32LE:
+ p = AFMT_S32_LE;
+ break;
+ case Qmmp::PCM_S24LE:
+ p = AFMT_S24_LE;
+ break;
+ case Qmmp::PCM_S16LE:
+ p = AFMT_S16_LE;
+ break;
+ case Qmmp::PCM_S8:
+ p = AFMT_S8;
+ break;
+ default:
+ qWarning("OutputOSS4: unsupported audio format");
+ return;
+ }
+ int param = p;
+ if (ioctl(m_audio_fd, SNDCTL_DSP_SETFMT, &p) < 0)
+ {
+ qWarning("OutputOSS4: ioctl SNDCTL_DSP_SETFMT failed: %s",strerror(errno));
+ return;
+ }
+ if(param != p)
+ {
+ qWarning("OutputOSS4: unsupported audio format");
+ return;
+ }
+ param = chan;
+ if(ioctl(m_audio_fd, SNDCTL_DSP_CHANNELS, &chan) < 0)
+ {
+ qWarning("OutputOSS4: ioctl SNDCTL_DSP_CHANNELS failed: %s", strerror(errno));
+ return;
+ }
+ if(param != chan)
+ {
+ qWarning("OutputOSS4: unsupported %d-channel mode", param);
+ return;
+ }
+ uint param2 = freq;
+ if (ioctl(m_audio_fd, SNDCTL_DSP_SPEED, &freq) < 0)
+ {
+ qWarning("OutputOSS4: ioctl SNDCTL_DSP_SPEED failed: %s", strerror(errno));
+ return;
+ }
+ if(param2 != freq)
+ {
+ qWarning("OutputOSS4: unsupported sample rate");
+ return;
+ }
+ ioctl(m_audio_fd, SNDCTL_DSP_RESET, 0);
+ Output::configure(freq, chan, format);
+}
+
+int OutputOSS4::fd()
+{
+ return m_audio_fd;
+}
+
+OutputOSS4 *OutputOSS4::instance()
+{
+ return m_instance;
+}
+
+void OutputOSS4::post()
+{
+ ioctl(m_audio_fd, SNDCTL_DSP_POST, 0);
+}
+
+void OutputOSS4::sync()
+{
+ ioctl(m_audio_fd, SNDCTL_DSP_SYNC, 0);
+}
+
+bool OutputOSS4::initialize()
+{
+ m_audio_fd = open(m_audio_device.toAscii(), O_WRONLY, 0);
+
+ if (m_audio_fd < 0)
+ {
+ qWarning("OSS4Output: unable to open output device '%s'; error: %s",
+ qPrintable(m_audio_device), strerror(errno));
+ return false;
+ }
+
+ int flags;
+ if ((flags = fcntl(m_audio_fd, F_GETFL, 0)) > 0)
+ {
+ flags &= O_NDELAY;
+ fcntl(m_audio_fd, F_SETFL, flags);
+ }
+ fd_set afd;
+ FD_ZERO(&afd);
+ FD_SET(m_audio_fd, &afd);
+ struct timeval tv;
+ tv.tv_sec = 0l;
+ tv.tv_usec = 50000l;
+ m_do_select = (select(m_audio_fd + 1, 0, &afd, 0, &tv) > 0);
+ return true;
+}
+
+qint64 OutputOSS4::latency()
+{
+ return 0;
+}
+
+qint64 OutputOSS4::writeAudio(unsigned char *data, qint64 maxSize)
+{
+ fd_set afd;
+ struct timeval tv;
+ qint64 m = -1, l;
+ FD_ZERO(&afd);
+ FD_SET(m_audio_fd, &afd);
+ // nice long poll timeout
+ tv.tv_sec = 5l;
+ tv.tv_usec = 0l;
+ if ((!m_do_select || (select(m_audio_fd + 1, 0, &afd, 0, &tv) > 0 &&
+ FD_ISSET(m_audio_fd, &afd))))
+ {
+ l = qMin(int(2048), int(maxSize));
+ if (l > 0)
+ {
+ m = write(m_audio_fd, data, l);
+ }
+ }
+ post();
+ return m;
+}
+
+void OutputOSS4::drain()
+{
+ ioctl(m_audio_fd, SNDCTL_DSP_SYNC, 0);
+}
+
+void OutputOSS4::reset()
+{
+ ioctl(m_audio_fd, SNDCTL_DSP_RESET, 0);
+}
+
+/***** MIXER *****/
+VolumeControlOSS4::VolumeControlOSS4(QObject *parent) : VolumeControl(parent)
+{}
+
+VolumeControlOSS4::~VolumeControlOSS4()
+{}
+
+void VolumeControlOSS4::setVolume(int l, int r)
+{
+ if(OutputOSS4::instance() && OutputOSS4::instance()->fd() >= 0)
+ {
+ int v = (r << 8) | l;
+ ioctl(OutputOSS4::instance()->fd(), SNDCTL_DSP_SETPLAYVOL, &v);
+ }
+}
+
+void VolumeControlOSS4::volume(int *ll,int *rr)
+{
+ *ll = 0;
+ *rr = 0;
+ if(OutputOSS4::instance() && OutputOSS4::instance()->fd() >= 0)
+ {
+ int v = 0;
+ if (ioctl(OutputOSS4::instance()->fd(), SNDCTL_DSP_GETPLAYVOL, &v) < 0)
+ v = 0;
+ *rr = (v & 0xFF00) >> 8;
+ *ll = (v & 0x00FF);
+ }
+}
diff --git a/src/plugins/Output/oss4/outputoss4.h b/src/plugins/Output/oss4/outputoss4.h
new file mode 100644
index 000000000..a9d1bd608
--- /dev/null
+++ b/src/plugins/Output/oss4/outputoss4.h
@@ -0,0 +1,73 @@
+/***************************************************************************
+ * Copyright (C) 2010 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 OUTPUTOSS4_H
+#define OUTPUTOSS4_H
+
+#include <qmmp/output.h>
+#include <qmmp/volumecontrol.h>
+
+#define DEFAULT_DEV "/dev/dsp"
+#define DEFAULT_MIXER "/dev/mixer"
+
+/**
+ @author Ilya Kotov <forkotov@hotmail.ru>
+*/
+class OutputOSS4 : public Output
+{
+Q_OBJECT
+public:
+ OutputOSS4(QObject * parent);
+ virtual ~OutputOSS4();
+
+ bool initialize();
+ void configure(quint32, int, Qmmp::AudioFormat format);
+ qint64 latency();
+ int fd();
+
+ static OutputOSS4 *instance();
+
+private:
+ //output api
+ qint64 writeAudio(unsigned char *data, qint64 maxSize);
+ void drain();
+ void reset();
+
+private:
+ void post();
+ void sync();
+ QString m_audio_device;
+ bool m_do_select;
+ int m_audio_fd;
+ static OutputOSS4 *m_instance;
+};
+
+class VolumeControlOSS4 : public VolumeControl
+{
+ Q_OBJECT
+public:
+ VolumeControlOSS4(QObject *parent);
+ ~VolumeControlOSS4();
+
+ void setVolume(int left, int right);
+ void volume(int *left, int *right);
+};
+
+#endif
diff --git a/src/plugins/Output/oss4/outputoss4factory.cpp b/src/plugins/Output/oss4/outputoss4factory.cpp
new file mode 100644
index 000000000..b395a7a7a
--- /dev/null
+++ b/src/plugins/Output/oss4/outputoss4factory.cpp
@@ -0,0 +1,69 @@
+/***************************************************************************
+ * Copyright (C) 2007 by Zhuravlev Uriy *
+ * stalkerg@gmail.com *
+ * *
+ * 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 <QtGui>
+#include <qmmp/qmmp.h>
+#include "settingsdialog.h"
+#include "outputoss4.h"
+#include "outputoss4factory.h"
+
+
+Output* OutputOSS4Factory::create(QObject* parent)
+{
+ return new OutputOSS4(parent);
+}
+
+const OutputProperties OutputOSS4Factory::properties() const
+{
+ OutputProperties properties;
+ properties.name = tr("OSS4 Plugin");
+ properties.shortName = "oss4";
+ properties.hasAbout = true;
+ properties.hasSettings = true;
+ return properties;
+}
+
+VolumeControl *OutputOSS4Factory::createVolumeControl(QObject *parent)
+{
+ return new VolumeControlOSS4(parent);
+}
+
+void OutputOSS4Factory::showSettings(QWidget* parent)
+{
+ SettingsDialog *s = new SettingsDialog(parent);
+ s->show();
+}
+
+void OutputOSS4Factory::showAbout(QWidget *parent)
+{
+ QMessageBox::about (parent, tr("About OSS4 Output Plugin"),
+ tr("Qmmp OSS4 Output Plugin")+"\n"+
+ tr("Writen by: Ilya Kotov <forkotov02@hotmail.ru>"));
+}
+
+QTranslator *OutputOSS4Factory::createTranslator(QObject *parent)
+{
+ QTranslator *translator = new QTranslator(parent);
+ QString locale = Qmmp::systemLanguageID();
+ translator->load(QString(":/oss4_plugin_") + locale);
+ return translator;
+}
+
+Q_EXPORT_PLUGIN2(oss4,OutputOSS4Factory)
diff --git a/src/plugins/Output/oss4/outputoss4factory.h b/src/plugins/Output/oss4/outputoss4factory.h
new file mode 100644
index 000000000..04855d54c
--- /dev/null
+++ b/src/plugins/Output/oss4/outputoss4factory.h
@@ -0,0 +1,47 @@
+/***************************************************************************
+ * Copyright (C) 2006 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 OUTPUTOSSFACTORY_H
+#define OUTPUTOSSFACTORY_H
+
+
+#include <QObject>
+#include <QString>
+#include <QIODevice>
+#include <QWidget>
+#include <qmmp/output.h>
+#include <qmmp/outputfactory.h>
+
+
+class OutputOSS4Factory : public QObject,
+ OutputFactory
+{
+Q_OBJECT
+Q_INTERFACES(OutputFactory);
+
+public:
+ const OutputProperties properties() const;
+ Output* create(QObject* parent);
+ VolumeControl *createVolumeControl(QObject *parent);
+ void showSettings(QWidget* parent);
+ void showAbout(QWidget *parent);
+ QTranslator *createTranslator(QObject *parent);
+};
+
+#endif
diff --git a/src/plugins/Output/oss4/settingsdialog.cpp b/src/plugins/Output/oss4/settingsdialog.cpp
new file mode 100644
index 000000000..ea4401ae2
--- /dev/null
+++ b/src/plugins/Output/oss4/settingsdialog.cpp
@@ -0,0 +1,110 @@
+/***************************************************************************
+ * Copyright (C) 2010 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 <QSettings>
+#include <QDir>
+#include <qmmp/qmmp.h>
+
+extern "C"
+{
+#ifdef HAVE_SYS_SOUNDCARD_H
+#include <sys/soundcard.h>
+#else
+#include <soundcard.h>
+#endif
+//#include </usr/lib/oss/include/sys/soundcard.h>
+}
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <iostream>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/time.h>
+#include "outputoss4.h"
+#include "settingsdialog.h"
+
+SettingsDialog::SettingsDialog (QWidget *parent) : QDialog (parent)
+{
+ ui.setupUi (this);
+ setAttribute (Qt::WA_DeleteOnClose);
+
+
+
+ int mixer_fd = -1;
+ oss_sysinfo info;
+ if ((mixer_fd = ::open(DEFAULT_MIXER, O_RDWR)) < 0)
+ {
+ qWarning("SettingsDialog: %s", strerror(errno));
+ return;
+ }
+ if (ioctl(mixer_fd, SNDCTL_SYSINFO, &info) < 0)
+ {
+ qWarning("SettingsDialog: ioctl SNDCTL_SYSINFO failed: %s", strerror(errno));
+ return;
+ }
+
+ if (info.numaudios < 1)
+ {
+ qWarning("SettingsDialog: no device found");
+ return;
+ }
+
+ m_devices << DEFAULT_DEV;
+ ui.deviceComboBox->addItem(tr("Default") + " (" + DEFAULT_DEV + ")");
+
+ for (int i = 0; i < info.numaudios; ++i)
+ {
+ oss_audioinfo audio_info;
+ audio_info.dev = i;
+
+ if (ioctl(mixer_fd, SNDCTL_AUDIOINFO, &audio_info) < 0)
+ {
+ qWarning("SettingsDialog: ioctl SNDCTL_AUDIOINFO failed: %s", strerror(errno));
+ return;
+ }
+
+ if (audio_info.caps & PCM_CAP_OUTPUT)
+ {
+ m_devices << audio_info.devnode;
+ ui.deviceComboBox->addItem(QString("%1 (%2)").arg(audio_info.name).arg(audio_info.devnode));
+ }
+ }
+ QSettings settings(Qmmp::configFile(), QSettings::IniFormat);
+ ui.deviceComboBox->setEditText(settings.value("OSS4/device", DEFAULT_DEV).toString());
+ connect (ui.deviceComboBox, SIGNAL(activated(int)),SLOT(setText(int)));
+}
+
+SettingsDialog::~SettingsDialog()
+{}
+
+void SettingsDialog::setText(int n)
+{
+ ui.deviceComboBox->setEditText(m_devices.at(n));
+}
+
+void SettingsDialog::accept()
+{
+ qDebug("%s", Q_FUNC_INFO);
+ QSettings settings(Qmmp::configFile(), QSettings::IniFormat);
+ settings.setValue("OSS4/device", ui.deviceComboBox->currentText ());
+ QDialog::accept();
+}
+
diff --git a/src/plugins/Output/oss4/settingsdialog.h b/src/plugins/Output/oss4/settingsdialog.h
new file mode 100644
index 000000000..03b694a97
--- /dev/null
+++ b/src/plugins/Output/oss4/settingsdialog.h
@@ -0,0 +1,46 @@
+/***************************************************************************
+ * Copyright (C) 2010 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 <QDialog>
+#include "ui_settingsdialog.h"
+
+/**
+ @author Ilya Kotov <forkotov@hotmail.ru>
+*/
+class SettingsDialog : public QDialog
+{
+Q_OBJECT
+public:
+ SettingsDialog(QWidget *parent);
+ ~SettingsDialog();
+
+private slots:
+ void setText(int n);
+
+private:
+ virtual void accept();
+ Ui::SettingsDialog ui;
+ QStringList m_devices;
+
+};
+
+#endif
diff --git a/src/plugins/Output/oss4/settingsdialog.ui b/src/plugins/Output/oss4/settingsdialog.ui
new file mode 100644
index 000000000..e96f1706c
--- /dev/null
+++ b/src/plugins/Output/oss4/settingsdialog.ui
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SettingsDialog</class>
+ <widget class="QDialog" name="SettingsDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>276</width>
+ <height>68</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>OSS4 Plugin Settings</string>
+ </property>
+ <layout class="QGridLayout">
+ <property name="margin">
+ <number>9</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item row="0" column="1" colspan="2">
+ <widget class="QComboBox" name="deviceComboBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" colspan="3">
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Device:</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>SettingsDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>179</x>
+ <y>51</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>274</x>
+ <y>2</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>SettingsDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>231</x>
+ <y>46</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>271</x>
+ <y>44</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/src/plugins/Output/oss4/translations/oss4_plugin_cs.ts b/src/plugins/Output/oss4/translations/oss4_plugin_cs.ts
new file mode 100644
index 000000000..6ef3d22ae
--- /dev/null
+++ b/src/plugins/Output/oss4/translations/oss4_plugin_cs.ts
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="cs">
+<context>
+ <name>OutputOSS4Factory</name>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="36"/>
+ <source>OSS4 Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="56"/>
+ <source>About OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="57"/>
+ <source>Qmmp OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="58"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="14"/>
+ <source>OSS4 Plugin Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="52"/>
+ <source>Device:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.cpp" line="71"/>
+ <source>Default</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Output/oss4/translations/oss4_plugin_de.ts b/src/plugins/Output/oss4/translations/oss4_plugin_de.ts
new file mode 100644
index 000000000..a11d54110
--- /dev/null
+++ b/src/plugins/Output/oss4/translations/oss4_plugin_de.ts
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="de_DE">
+<context>
+ <name>OutputOSS4Factory</name>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="36"/>
+ <source>OSS4 Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="56"/>
+ <source>About OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="57"/>
+ <source>Qmmp OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="58"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="14"/>
+ <source>OSS4 Plugin Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="52"/>
+ <source>Device:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.cpp" line="71"/>
+ <source>Default</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Output/oss4/translations/oss4_plugin_es.ts b/src/plugins/Output/oss4/translations/oss4_plugin_es.ts
new file mode 100644
index 000000000..afc361729
--- /dev/null
+++ b/src/plugins/Output/oss4/translations/oss4_plugin_es.ts
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="es">
+<context>
+ <name>OutputOSS4Factory</name>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="36"/>
+ <source>OSS4 Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="56"/>
+ <source>About OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="57"/>
+ <source>Qmmp OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="58"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="14"/>
+ <source>OSS4 Plugin Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="52"/>
+ <source>Device:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.cpp" line="71"/>
+ <source>Default</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Output/oss4/translations/oss4_plugin_it.ts b/src/plugins/Output/oss4/translations/oss4_plugin_it.ts
new file mode 100644
index 000000000..ccd3e441a
--- /dev/null
+++ b/src/plugins/Output/oss4/translations/oss4_plugin_it.ts
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="it">
+<context>
+ <name>OutputOSS4Factory</name>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="36"/>
+ <source>OSS4 Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="56"/>
+ <source>About OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="57"/>
+ <source>Qmmp OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="58"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="14"/>
+ <source>OSS4 Plugin Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="52"/>
+ <source>Device:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.cpp" line="71"/>
+ <source>Default</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Output/oss4/translations/oss4_plugin_ja.ts b/src/plugins/Output/oss4/translations/oss4_plugin_ja.ts
new file mode 100644
index 000000000..7a15da61e
--- /dev/null
+++ b/src/plugins/Output/oss4/translations/oss4_plugin_ja.ts
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ja_JP">
+<context>
+ <name>OutputOSS4Factory</name>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="36"/>
+ <source>OSS4 Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="56"/>
+ <source>About OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="57"/>
+ <source>Qmmp OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="58"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="14"/>
+ <source>OSS4 Plugin Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="52"/>
+ <source>Device:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.cpp" line="71"/>
+ <source>Default</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Output/oss4/translations/oss4_plugin_lt.ts b/src/plugins/Output/oss4/translations/oss4_plugin_lt.ts
new file mode 100644
index 000000000..400884579
--- /dev/null
+++ b/src/plugins/Output/oss4/translations/oss4_plugin_lt.ts
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="lt">
+<context>
+ <name>OutputOSS4Factory</name>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="36"/>
+ <source>OSS4 Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="56"/>
+ <source>About OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="57"/>
+ <source>Qmmp OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="58"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="14"/>
+ <source>OSS4 Plugin Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="52"/>
+ <source>Device:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.cpp" line="71"/>
+ <source>Default</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Output/oss4/translations/oss4_plugin_nl.ts b/src/plugins/Output/oss4/translations/oss4_plugin_nl.ts
new file mode 100644
index 000000000..3f61995ce
--- /dev/null
+++ b/src/plugins/Output/oss4/translations/oss4_plugin_nl.ts
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="nl">
+<context>
+ <name>OutputOSS4Factory</name>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="36"/>
+ <source>OSS4 Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="56"/>
+ <source>About OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="57"/>
+ <source>Qmmp OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="58"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="14"/>
+ <source>OSS4 Plugin Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="52"/>
+ <source>Device:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.cpp" line="71"/>
+ <source>Default</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Output/oss4/translations/oss4_plugin_pl.ts b/src/plugins/Output/oss4/translations/oss4_plugin_pl.ts
new file mode 100644
index 000000000..03ff22dcf
--- /dev/null
+++ b/src/plugins/Output/oss4/translations/oss4_plugin_pl.ts
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="pl">
+<context>
+ <name>OutputOSS4Factory</name>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="36"/>
+ <source>OSS4 Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="56"/>
+ <source>About OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="57"/>
+ <source>Qmmp OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="58"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="14"/>
+ <source>OSS4 Plugin Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="52"/>
+ <source>Device:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.cpp" line="71"/>
+ <source>Default</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Output/oss4/translations/oss4_plugin_ru.ts b/src/plugins/Output/oss4/translations/oss4_plugin_ru.ts
new file mode 100644
index 000000000..7dcbdda9f
--- /dev/null
+++ b/src/plugins/Output/oss4/translations/oss4_plugin_ru.ts
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ru">
+<context>
+ <name>OutputOSS4Factory</name>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="36"/>
+ <source>OSS4 Plugin</source>
+ <translation>Модуль OSS4</translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="56"/>
+ <source>About OSS4 Output Plugin</source>
+ <translation>Модуль поддержки OSS4 для Qmmp</translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="57"/>
+ <source>Qmmp OSS4 Output Plugin</source>
+ <translation>Модуль OSS4 для Qmmp</translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="58"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation>Разработчик: Илья Котов &lt;forkotov02@hotmail.ru&gt;</translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="14"/>
+ <source>OSS4 Plugin Settings</source>
+ <translation>Настройки модуля OSS4</translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="52"/>
+ <source>Device:</source>
+ <translation>Устройство:</translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.cpp" line="71"/>
+ <source>Default</source>
+ <translation>По умолчанию</translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Output/oss4/translations/oss4_plugin_tr.ts b/src/plugins/Output/oss4/translations/oss4_plugin_tr.ts
new file mode 100644
index 000000000..1d847c2ee
--- /dev/null
+++ b/src/plugins/Output/oss4/translations/oss4_plugin_tr.ts
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="tr_TR">
+<context>
+ <name>OutputOSS4Factory</name>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="36"/>
+ <source>OSS4 Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="56"/>
+ <source>About OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="57"/>
+ <source>Qmmp OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="58"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="14"/>
+ <source>OSS4 Plugin Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="52"/>
+ <source>Device:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.cpp" line="71"/>
+ <source>Default</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Output/oss4/translations/oss4_plugin_uk_UA.ts b/src/plugins/Output/oss4/translations/oss4_plugin_uk_UA.ts
new file mode 100644
index 000000000..ffdc511a1
--- /dev/null
+++ b/src/plugins/Output/oss4/translations/oss4_plugin_uk_UA.ts
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="uk">
+<context>
+ <name>OutputOSS4Factory</name>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="36"/>
+ <source>OSS4 Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="56"/>
+ <source>About OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="57"/>
+ <source>Qmmp OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="58"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="14"/>
+ <source>OSS4 Plugin Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="52"/>
+ <source>Device:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.cpp" line="71"/>
+ <source>Default</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Output/oss4/translations/oss4_plugin_zh_CN.ts b/src/plugins/Output/oss4/translations/oss4_plugin_zh_CN.ts
new file mode 100644
index 000000000..5cb3d8efc
--- /dev/null
+++ b/src/plugins/Output/oss4/translations/oss4_plugin_zh_CN.ts
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="zh_CN">
+<context>
+ <name>OutputOSS4Factory</name>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="36"/>
+ <source>OSS4 Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="56"/>
+ <source>About OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="57"/>
+ <source>Qmmp OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="58"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="14"/>
+ <source>OSS4 Plugin Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="52"/>
+ <source>Device:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.cpp" line="71"/>
+ <source>Default</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Output/oss4/translations/oss4_plugin_zh_TW.ts b/src/plugins/Output/oss4/translations/oss4_plugin_zh_TW.ts
new file mode 100644
index 000000000..704287e8c
--- /dev/null
+++ b/src/plugins/Output/oss4/translations/oss4_plugin_zh_TW.ts
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="zh_TW">
+<context>
+ <name>OutputOSS4Factory</name>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="36"/>
+ <source>OSS4 Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="56"/>
+ <source>About OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="57"/>
+ <source>Qmmp OSS4 Output Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../outputoss4factory.cpp" line="58"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SettingsDialog</name>
+ <message>
+ <location filename="../settingsdialog.ui" line="14"/>
+ <source>OSS4 Plugin Settings</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.ui" line="52"/>
+ <source>Device:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../settingsdialog.cpp" line="71"/>
+ <source>Default</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Output/oss4/translations/translations.qrc b/src/plugins/Output/oss4/translations/translations.qrc
new file mode 100644
index 000000000..8e4989965
--- /dev/null
+++ b/src/plugins/Output/oss4/translations/translations.qrc
@@ -0,0 +1,18 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource>
+ <file>oss4_plugin_it.qm</file>
+ <file>oss4_plugin_cs.qm</file>
+ <file>oss4_plugin_de.qm</file>
+ <file>oss4_plugin_zh_CN.qm</file>
+ <file>oss4_plugin_zh_TW.qm</file>
+ <file>oss4_plugin_pl.qm</file>
+ <file>oss4_plugin_ru.qm</file>
+ <file>oss4_plugin_uk_UA.qm</file>
+ <file>oss4_plugin_tr.qm</file>
+ <file>oss4_plugin_lt.qm</file>
+ <file>oss4_plugin_nl.qm</file>
+ <file>oss4_plugin_ja.qm</file>
+ <file>oss4_plugin_es.qm</file>
+ </qresource>
+</RCC>