aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-11-07 16:12:23 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-11-07 16:12:23 +0000
commit0d55d4504e5aedbcde0386d4f18864c1eed9b25d (patch)
tree6516771ba353a49dae7764262b6c01cdb4716882
parent8b1fde7fe3f5bfd7584e7ac6915023d837e35641 (diff)
downloadqmmp-0d55d4504e5aedbcde0386d4f18864c1eed9b25d.tar.gz
qmmp-0d55d4504e5aedbcde0386d4f18864c1eed9b25d.tar.bz2
qmmp-0d55d4504e5aedbcde0386d4f18864c1eed9b25d.zip
moved oss4 support to separate plugin, fixed some bugs, updated documentation
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1983 90c681e8-e032-0410-971d-27865f9a5e38
-rw-r--r--CMakeLists.txt1
-rw-r--r--README5
-rw-r--r--README.RUS4
-rw-r--r--qmmp.pri1
-rw-r--r--src/plugins/Output/CMakeLists.txt5
-rw-r--r--src/plugins/Output/Output.pro6
-rw-r--r--src/plugins/Output/oss/outputoss.cpp224
-rw-r--r--src/plugins/Output/oss/outputoss.h20
-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
31 files changed, 1513 insertions, 182 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fb5248157..c88711d53 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -119,6 +119,7 @@ MESSAGE("")
MESSAGE("Output Plugins:")
PRINT_SUMMARY ("ALSA support ......................" USE_ALSA ALSA_FOUND)
PRINT_SUMMARY ("OSS support ......................." USE_OSS 1)
+PRINT_SUMMARY ("OSS4 support ......................" USE_OSS4 OSS4_FOUND)
PRINT_SUMMARY ("JACK support ......................" USE_JACK JACK_FOUND)
PRINT_SUMMARY ("PulseAudio support ................" USE_PULSE PULSE_FOUND)
PRINT_SUMMARY ("Null output support ..............." USE_NULL 1)
diff --git a/README b/README
index c178e8ca3..0f9592654 100644
--- a/README
+++ b/README
@@ -102,7 +102,7 @@ Available options:
- USE_CURL, USE_MMS (transports);
- 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_MIDI, USE_GME (decoders);
-- USE_ALSA, USE_OSS, USE_JACK, USE_PULSE, USE_NULL, USE_WAVEOUT (output plugins);
+- USE_ALSA, USE_OSS, USE_JACK, USE_PULSE, USE_NULL, USE_OSS4, USE_WAVEOUT (output plugins);
- USE_SRC, USE_BS2B, USE_LADSPA, USE_CROSSFADE (effects);
- USE_ANALYZER, USE_PROJECTM (visualization);
- USE_MPRIS, USE_SCROBBLER, USE_STATICON, USE_NOTIFIER, USE_LYRICS, USE_HAL, USE_HOTKEY, USE_FILEOPS, USE_COVER,
@@ -140,5 +140,8 @@ qmake-qt4 LIB_DIR=/lib64
or
cmake ./ -DLIB_DIR=lib64
+OSS4 support.
+OSS4 plugin is disabled by default. To enable it run cmake ./ -DUSE_OSS4:BOOL=TRUE before compilation.
+
All patches, bug reports, ideas etc. send to forkotov02@hotmail.ru or use issue tracker
http://code.google.com/p/qmmp/issues/list
diff --git a/README.RUS b/README.RUS
index ab28f7f98..4fdab1660 100644
--- a/README.RUS
+++ b/README.RUS
@@ -101,7 +101,7 @@ cmake ./ -DUSE_JACK:BOOL=FALSE
- USE_CURL, USE_MMS (транспортные модули);
- 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_MIDI, USE_GME (декодеры);
-- USE_ALSA, USE_OSS, USE_JACK, USE_PULSE, USE_NULL, USE_WAVEOUT (output plugins);
+- USE_ALSA, USE_OSS, USE_JACK, USE_PULSE, USE_NULL, USE_OSS4, USE_WAVEOUT (модули вывода);
- USE_SRC, USE_BS2B, USE_LADSPA, USE_CROSSFADE (эффекты);
- USE_ANALYZER, USE_PROJECTM (визуализация);
- USE_MPRIS, USE_SCROBBLER, USE_STATICON, USE_NOTIFIER, USE_LYRICS, USE_HAL, USE_HOTKEY, USE_FILEOPS, USE_COVER,
@@ -137,6 +137,8 @@ qmake-qt4 LIB_DIR=/lib64
или
cmake ./ -DLIB_DIR=lib64
+Поддержка OSS4.
+Модуль вывода OSS4 отключён по умолчанию. Для его включения выполните cmake ./ -DUSE_OSS4:BOOL=TRUE перед сборкой.
Патчи, багрепорты, идеи и т.п.: forkotov02@hotmail.ru или http://code.google.com/p/qmmp/issues/list
diff --git a/qmmp.pri b/qmmp.pri
index 89a0db2b4..df82d4030 100644
--- a/qmmp.pri
+++ b/qmmp.pri
@@ -23,6 +23,7 @@ CONFIG += GME_PLUGIN
CONFIG += OSS_PLUGIN
CONFIG += PULSE_AUDIO_PLUGIN
CONFIG += ALSA_PLUGIN
+#CONFIG += OSS4_PLUGIN
CONFIG += AAC_PLUGIN
CONFIG += MPLAYER_PLUGIN
CONFIG += CDAUDIO_PLUGIN
diff --git a/src/plugins/Output/CMakeLists.txt b/src/plugins/Output/CMakeLists.txt
index de01f25e6..da349e5a3 100644
--- a/src/plugins/Output/CMakeLists.txt
+++ b/src/plugins/Output/CMakeLists.txt
@@ -1,6 +1,7 @@
SET(USE_ALSA TRUE CACHE BOOL "enable/disable alsa plugin")
SET(USE_JACK TRUE CACHE BOOL "enable/disable jack plugin")
SET(USE_OSS TRUE CACHE BOOL "enable/disable oss plugin")
+SET(USE_OSS4 FALSE CACHE BOLL "enable/disable oss4 plugin")
SET(USE_PULSE TRUE CACHE BOOL "enable/disable pulse audio plugin")
SET(USE_NULL TRUE CACHE BOOL "enable/disable null output plugin")
SET(USE_WAVEOUT TRUE CACHE BOOL "enable/disable Win32 waveout plugin")
@@ -17,6 +18,10 @@ IF(USE_OSS)
add_subdirectory(oss)
ENDIF(USE_OSS)
+IF(USE_OSS4)
+add_subdirectory(oss4)
+ENDIF(USE_OSS4)
+
IF(USE_PULSE)
add_subdirectory(pulseaudio)
ENDIF(USE_PULSE)
diff --git a/src/plugins/Output/Output.pro b/src/plugins/Output/Output.pro
index c355acbbf..393299941 100644
--- a/src/plugins/Output/Output.pro
+++ b/src/plugins/Output/Output.pro
@@ -34,4 +34,10 @@ contains(CONFIG, ALSA_PLUGIN){
message(* ALSA plugin enabled *)
message(***********************)
}
+
+contains(CONFIG, OSS4_PLUGIN){
+ SUBDIRS += oss4
+ message(***********************)
+ message(* OSS4 plugin enabled *)
+ message(***********************)
}
diff --git a/src/plugins/Output/oss/outputoss.cpp b/src/plugins/Output/oss/outputoss.cpp
index eea53584d..6722f18ad 100644
--- a/src/plugins/Output/oss/outputoss.cpp
+++ b/src/plugins/Output/oss/outputoss.cpp
@@ -20,6 +20,8 @@
***************************************************************************/
#include <QApplication>
+#include <QSettings>
+#include <QDir>
extern "C"
{
@@ -30,123 +32,94 @@ extern "C"
#endif
}
-#include "outputoss.h"
-#include <qmmp/buffer.h>
-#include <qmmp/visual.h>
-
#include <stdio.h>
#include <string.h>
-#include <QtGlobal>
-#include <QSettings>
-#include <QDir>
-
+#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 "outputoss.h"
-#if defined(__FreeBSD__)
-# include <sys/soundcard.h>
-#elif defined(__linux__)
-# include <linux/soundcard.h>
-#elif defined(__bsdi__)
-# include <sys/soundcard.h>
-#endif
-
-OutputOSS *OutputOSS::m_instance = 0;
-VolumeControlOSS *VolumeControlOSS::m_instance = 0;
-
-OutputOSS* OutputOSS::instance()
-{
- return m_instance;
-}
-
-OutputOSS::OutputOSS(QObject * parent)
- : Output(parent), m_inited(false),
- m_frequency(-1), m_channels(-1),
- do_select(true),
- m_audio_fd(-1)
+OutputOSS::OutputOSS(QObject * parent) : Output(parent), do_select(true), m_audio_fd(-1)
{
QSettings settings(Qmmp::configFile(), QSettings::IniFormat);
m_audio_device = settings.value("OSS/device","/dev/dsp").toString();
- m_instance = this;
-}
-
-int OutputOSS::audio_fd()
-{
- return m_audio_fd;
}
OutputOSS::~OutputOSS()
{
- uninitialize();
- m_instance = 0;
+ if (m_audio_fd >= 0)
+ {
+ ioctl(m_audio_fd, SNDCTL_DSP_RESET, 0);
+ close(m_audio_fd);
+ m_audio_fd = -1;
+ }
}
void OutputOSS::configure(quint32 freq, int chan, Qmmp::AudioFormat format)
{
-
-#if SOUND_VERSION >= 0x040000
- if (VolumeControlOSS::instance())
- {
- long cmd;
- int v;
- cmd = SNDCTL_DSP_SETPLAYVOL;
- v = (VolumeControlOSS::instance()->right() << 8) | VolumeControlOSS::instance()->left();
- if(m_audio_fd > 1)
- ioctl(m_audio_fd, cmd, &v);
- }
-#endif
- m_frequency = freq;
- m_channels = chan;
-
- //m_bps = freq * chan * (prec / 8);
-
int p;
switch (format)
{
- default:
case Qmmp::PCM_S16LE:
-#if defined(AFMT_S16_NE)
- p = AFMT_S16_NE;
-#else
p = AFMT_S16_LE;
-#endif
break;
-
case Qmmp::PCM_S8:
p = AFMT_S8;
break;
-
+ default:
+ qWarning("OutputOSS: unsupported audio format");
+ return;
}
-
- if (ioctl(m_audio_fd, SNDCTL_DSP_SETFMT, &p) == -1)
- qWarning("OutputOSS: can't set audio format");
- int stereo = (chan > 1) ? 1 : 0;
- ioctl(m_audio_fd, SNDCTL_DSP_STEREO, &stereo);
- if (ioctl(m_audio_fd, SNDCTL_DSP_SPEED, &freq) == -1)
- qWarning("OutputOSS: can't set audio format");
+ int param = p;
+ if (ioctl(m_audio_fd, SNDCTL_DSP_SETFMT, &p) < 0)
+ {
+ qWarning("OutputOSS: ioctl SNDCTL_DSP_SETFMT failed: %s",strerror(errno));
+ return;
+ }
+ if(param != p)
+ {
+ qWarning("OutputOSS: unsupported audio format");
+ return;
+ }
+ param = chan;
+ if(ioctl(m_audio_fd, SNDCTL_DSP_CHANNELS, &chan) < 0)
+ {
+ qWarning("OutputOSS: ioctl SNDCTL_DSP_CHANNELS failed: %s", strerror(errno));
+ return;
+ }
+ if(param != chan)
+ {
+ qWarning("OutputOSS: unsupported %d-channel mode", param);
+ return;
+ }
+ uint param2 = freq;
+ if (ioctl(m_audio_fd, SNDCTL_DSP_SPEED, &freq) < 0)
+ {
+ qWarning("OutputOSS: ioctl SNDCTL_DSP_SPEED failed: %s", strerror(errno));
+ return;
+ }
+ if(param2 != freq)
+ {
+ qWarning("OutputOSS: unsupported sample rate");
+ return;
+ }
+ ioctl(m_audio_fd, SNDCTL_DSP_RESET, 0);
Output::configure(freq, chan, format);
}
void OutputOSS::post()
{
- if (m_audio_fd < 1)
- return;
-
- int unused;
- ioctl(m_audio_fd, SNDCTL_DSP_POST, &unused);
+ ioctl(m_audio_fd, SNDCTL_DSP_POST, 0);
}
void OutputOSS::sync()
{
- if (m_audio_fd < 1)
- return;
-
- int unused;
- ioctl(m_audio_fd, SNDCTL_DSP_SYNC, &unused);
+ ioctl(m_audio_fd, SNDCTL_DSP_SYNC, 0);
}
bool OutputOSS::initialize()
@@ -172,26 +145,9 @@ bool OutputOSS::initialize()
tv.tv_sec = 0l;
tv.tv_usec = 50000l;
do_select = (select(m_audio_fd + 1, 0, &afd, 0, &tv) > 0);
- m_inited = true;
return true;
}
-void OutputOSS::uninitialize()
-{
- if (!m_inited)
- return;
- m_inited = false;
- m_frequency = -1;
- m_channels = -1;
- if (m_audio_fd > 0)
- {
- ioctl(m_audio_fd, SNDCTL_DSP_RESET, 0);
- close(m_audio_fd);
- m_audio_fd = -1;
- }
- qDebug("OutputOSS: uninitialize");
-}
-
qint64 OutputOSS::latency()
{
//ulong used = 0;
@@ -211,7 +167,7 @@ qint64 OutputOSS::writeAudio(unsigned char *data, qint64 maxSize)
// nice long poll timeout
tv.tv_sec = 5l;
tv.tv_usec = 0l;
- if ((! do_select || (select(m_audio_fd + 1, 0, &afd, 0, &tv) > 0 &&
+ if ((!do_select || (select(m_audio_fd + 1, 0, &afd, 0, &tv) > 0 &&
FD_ISSET(m_audio_fd, &afd))))
{
l = qMin(int(2048), int(maxSize));
@@ -235,71 +191,31 @@ void OutputOSS::reset()
}
/***** MIXER *****/
-VolumeControlOSS *VolumeControlOSS::instance()
-{
- return m_instance;
-}
-
VolumeControlOSS::VolumeControlOSS(QObject *parent) : VolumeControl(parent)
{
m_master = true;
m_mixer_fd = -1;
QSettings settings(Qmmp::configFile(), QSettings::IniFormat);
-#if SOUND_VERSION < 0x040000
m_mixer_device = settings.value("OSS/mixer_device","/dev/mixer").toString();
openMixer();
-#else
- m_mixer_device = settings.value("OSS/device","/dev/dsp").toString();
- int mixer_fd = -1;
- bool to_close = false;
- if (OutputOSS::instance() && OutputOSS::instance()->audio_fd() > 0)
- mixer_fd = OutputOSS::instance()->audio_fd();
- else
- {
- mixer_fd = open(m_audio_device.toAscii(), O_WRONLY, 0);
- to_close = true;
- }
- if(mixer_fd > 0)
- {
- int v;
- long cmd = SNDCTL_DSP_GETPLAYVOL;
- if (ioctl(mixer_fd, cmd, &v) == -1)
- v = 0;
- m_left2 = (v & 0xFF00) >> 8;
- m_right2 = (v & 0x00FF);
- }
- if(to_close)
- {
- close(mixer_fd);
- mixer_fd = -1;
- }
-#endif
- m_instance = this;
+
}
VolumeControlOSS::~VolumeControlOSS()
{
-#if SOUND_VERSION < 0x040000
- if (m_mixer_fd > 0)
+ if (m_mixer_fd >= 0)
{
close(m_mixer_fd);
m_mixer_fd = -1;
}
-#endif
- if (m_mixer_fd > 0 && !OutputOSS::instance())
- {
- close(m_mixer_fd);
- m_mixer_fd = -1;
- }
- m_instance = 0;
}
void VolumeControlOSS::setVolume(int l, int r)
{
+ if (m_mixer_fd < 0)
+ return;
int v;
long cmd;
-
-#if SOUND_VERSION < 0x040000
int devs = 0;
ioctl(m_mixer_fd, SOUND_MIXER_READ_DEVMASK, &devs);
if ((devs & SOUND_MASK_PCM) && !m_master)
@@ -313,22 +229,15 @@ void VolumeControlOSS::setVolume(int l, int r)
}
v = (r << 8) | l;
ioctl(m_mixer_fd, cmd, &v);
-#else
- cmd = SNDCTL_DSP_SETPLAYVOL;
- v = (r << 8) | l;
- if (OutputOSS::instance() && OutputOSS::instance()->audio_fd() > 0)
- ioctl(OutputOSS::instance()->audio_fd(), cmd, &v);
- m_left2 = l;
- m_right2 = r;
-#endif
}
void VolumeControlOSS::volume(int *ll,int *rr)
{
*ll = 0;
*rr = 0;
-#if SOUND_VERSION < 0x040000
- int cmd;
+ if(m_mixer_fd < 0)
+ return;
+ int cmd;
int v, devs = 0;
ioctl(m_mixer_fd, SOUND_MIXER_READ_DEVMASK, &devs);
if ((devs & SOUND_MASK_PCM) && !m_master)
@@ -347,21 +256,11 @@ void VolumeControlOSS::volume(int *ll,int *rr)
*rr = (*rr > 100) ? 100 : *rr;
*ll = (*ll < 0) ? 0 : *ll;
*rr = (*rr < 0) ? 0 : *rr;
-#else
- /*cmd = SNDCTL_DSP_GETPLAYVOL;
- if (ioctl(m_audio_fd, cmd, &v) == -1)
- v = 0;
- *rr = (v & 0xFF00) >> 8;
- *ll = (v & 0x00FF);*/
- *rr = m_left2;
- *ll = m_right2;
-#endif
}
void VolumeControlOSS::openMixer()
{
-#if SOUND_VERSION < 0x040000
- if (m_mixer_fd != -1)
+ if (m_mixer_fd >= 0)
return;
m_mixer_fd = open(m_mixer_device.toAscii(), O_RDWR);
if (m_mixer_fd < 0)
@@ -369,5 +268,4 @@ void VolumeControlOSS::openMixer()
qWarning("VolumeControlOSS: unable to open mixer device '%s'", qPrintable(m_mixer_device));
return;
}
-#endif
}
diff --git a/src/plugins/Output/oss/outputoss.h b/src/plugins/Output/oss/outputoss.h
index 5046b1bc3..c712e83fc 100644
--- a/src/plugins/Output/oss/outputoss.h
+++ b/src/plugins/Output/oss/outputoss.h
@@ -20,8 +20,8 @@
***************************************************************************/
-#ifndef OUTPUTOSS_H
-#define OUTPUTOSS_H
+#ifndef OUTPUTOSS_H
+#define OUTPUTOSS_H
class OutputOSS;
@@ -38,8 +38,6 @@ public:
bool initialize();
void configure(quint32, int, Qmmp::AudioFormat format);
qint64 latency();
- int audio_fd();
- static OutputOSS* instance();
private:
//output api
@@ -50,18 +48,11 @@ private:
private:
void post();
void sync();
- void uninitialize();
-
- QString m_audio_device, m_mixer_device;
-
- bool m_inited;
- quint32 m_frequency;
- int m_channels;
+ QString m_audio_device;
bool do_select;
int m_audio_fd;
long bl, br;
- static OutputOSS *m_instance;
};
class VolumeControlOSS : public VolumeControl
@@ -72,9 +63,6 @@ public:
~VolumeControlOSS();
void setVolume(int left, int right);
- static VolumeControlOSS* instance();
-
-protected:
void volume(int *left, int *right);
private:
@@ -84,8 +72,6 @@ private:
int m_mixer_fd;
QString m_mixer_device;
bool m_master;
- int m_left2, m_right2;
- static VolumeControlOSS *m_instance;
};
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>