From 0d55d4504e5aedbcde0386d4f18864c1eed9b25d Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 7 Nov 2010 16:12:23 +0000 Subject: 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 --- CMakeLists.txt | 1 + README | 5 +- README.RUS | 4 +- qmmp.pri | 1 + src/plugins/Output/CMakeLists.txt | 5 + src/plugins/Output/Output.pro | 6 + src/plugins/Output/oss/outputoss.cpp | 224 ++++++------------- src/plugins/Output/oss/outputoss.h | 20 +- src/plugins/Output/oss4/CMakeLists.txt | 97 +++++++++ src/plugins/Output/oss4/oss4.pro | 50 +++++ src/plugins/Output/oss4/outputoss4.cpp | 241 +++++++++++++++++++++ src/plugins/Output/oss4/outputoss4.h | 73 +++++++ src/plugins/Output/oss4/outputoss4factory.cpp | 69 ++++++ src/plugins/Output/oss4/outputoss4factory.h | 47 ++++ src/plugins/Output/oss4/settingsdialog.cpp | 110 ++++++++++ src/plugins/Output/oss4/settingsdialog.h | 46 ++++ src/plugins/Output/oss4/settingsdialog.ui | 93 ++++++++ .../Output/oss4/translations/oss4_plugin_cs.ts | 45 ++++ .../Output/oss4/translations/oss4_plugin_de.ts | 45 ++++ .../Output/oss4/translations/oss4_plugin_es.ts | 45 ++++ .../Output/oss4/translations/oss4_plugin_it.ts | 45 ++++ .../Output/oss4/translations/oss4_plugin_ja.ts | 45 ++++ .../Output/oss4/translations/oss4_plugin_lt.ts | 45 ++++ .../Output/oss4/translations/oss4_plugin_nl.ts | 45 ++++ .../Output/oss4/translations/oss4_plugin_pl.ts | 45 ++++ .../Output/oss4/translations/oss4_plugin_ru.ts | 45 ++++ .../Output/oss4/translations/oss4_plugin_tr.ts | 45 ++++ .../Output/oss4/translations/oss4_plugin_uk_UA.ts | 45 ++++ .../Output/oss4/translations/oss4_plugin_zh_CN.ts | 45 ++++ .../Output/oss4/translations/oss4_plugin_zh_TW.ts | 45 ++++ .../Output/oss4/translations/translations.qrc | 18 ++ 31 files changed, 1513 insertions(+), 182 deletions(-) create mode 100644 src/plugins/Output/oss4/CMakeLists.txt create mode 100644 src/plugins/Output/oss4/oss4.pro create mode 100644 src/plugins/Output/oss4/outputoss4.cpp create mode 100644 src/plugins/Output/oss4/outputoss4.h create mode 100644 src/plugins/Output/oss4/outputoss4factory.cpp create mode 100644 src/plugins/Output/oss4/outputoss4factory.h create mode 100644 src/plugins/Output/oss4/settingsdialog.cpp create mode 100644 src/plugins/Output/oss4/settingsdialog.h create mode 100644 src/plugins/Output/oss4/settingsdialog.ui create mode 100644 src/plugins/Output/oss4/translations/oss4_plugin_cs.ts create mode 100644 src/plugins/Output/oss4/translations/oss4_plugin_de.ts create mode 100644 src/plugins/Output/oss4/translations/oss4_plugin_es.ts create mode 100644 src/plugins/Output/oss4/translations/oss4_plugin_it.ts create mode 100644 src/plugins/Output/oss4/translations/oss4_plugin_ja.ts create mode 100644 src/plugins/Output/oss4/translations/oss4_plugin_lt.ts create mode 100644 src/plugins/Output/oss4/translations/oss4_plugin_nl.ts create mode 100644 src/plugins/Output/oss4/translations/oss4_plugin_pl.ts create mode 100644 src/plugins/Output/oss4/translations/oss4_plugin_ru.ts create mode 100644 src/plugins/Output/oss4/translations/oss4_plugin_tr.ts create mode 100644 src/plugins/Output/oss4/translations/oss4_plugin_uk_UA.ts create mode 100644 src/plugins/Output/oss4/translations/oss4_plugin_zh_CN.ts create mode 100644 src/plugins/Output/oss4/translations/oss4_plugin_zh_TW.ts create mode 100644 src/plugins/Output/oss4/translations/translations.qrc 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 +#include +#include extern "C" { @@ -30,123 +32,94 @@ extern "C" #endif } -#include "outputoss.h" -#include -#include - #include #include -#include -#include -#include - +#include #include - #include #include #include #include +#include +#include +#include "outputoss.h" -#if defined(__FreeBSD__) -# include -#elif defined(__linux__) -# include -#elif defined(__bsdi__) -# include -#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 +#include +#include +#ifdef HAVE_SYS_SOUNDCARD_H +#include +#else +#include +#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 +#include +#include + +extern "C" +{ +#ifdef HAVE_SYS_SOUNDCARD_H +#include +#else +#include +#endif +//#include +} + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#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 +#include + +#define DEFAULT_DEV "/dev/dsp" +#define DEFAULT_MIXER "/dev/mixer" + +/** + @author Ilya Kotov +*/ +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 +#include +#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 ")); +} + +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 +#include +#include +#include +#include +#include + + +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 +#include +#include + +extern "C" +{ +#ifdef HAVE_SYS_SOUNDCARD_H +#include +#else +#include +#endif +//#include +} +#include +#include +#include +#include +#include +#include +#include +#include +#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 +#include "ui_settingsdialog.h" + +/** + @author Ilya Kotov +*/ +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 @@ + + + SettingsDialog + + + + 0 + 0 + 276 + 68 + + + + OSS4 Plugin Settings + + + + 9 + + + 6 + + + + + + 0 + 0 + + + + true + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + 0 + 0 + + + + Device: + + + + + + + + + buttonBox + accepted() + SettingsDialog + accept() + + + 179 + 51 + + + 274 + 2 + + + + + buttonBox + rejected() + SettingsDialog + reject() + + + 231 + 46 + + + 271 + 44 + + + + + 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 @@ + + + + + OutputOSS4Factory + + + OSS4 Plugin + + + + + About OSS4 Output Plugin + + + + + Qmmp OSS4 Output Plugin + + + + + Writen by: Ilya Kotov <forkotov02@hotmail.ru> + + + + + SettingsDialog + + + OSS4 Plugin Settings + + + + + Device: + + + + + Default + + + + 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 @@ + + + + + OutputOSS4Factory + + + OSS4 Plugin + + + + + About OSS4 Output Plugin + + + + + Qmmp OSS4 Output Plugin + + + + + Writen by: Ilya Kotov <forkotov02@hotmail.ru> + + + + + SettingsDialog + + + OSS4 Plugin Settings + + + + + Device: + + + + + Default + + + + 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 @@ + + + + + OutputOSS4Factory + + + OSS4 Plugin + + + + + About OSS4 Output Plugin + + + + + Qmmp OSS4 Output Plugin + + + + + Writen by: Ilya Kotov <forkotov02@hotmail.ru> + + + + + SettingsDialog + + + OSS4 Plugin Settings + + + + + Device: + + + + + Default + + + + 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 @@ + + + + + OutputOSS4Factory + + + OSS4 Plugin + + + + + About OSS4 Output Plugin + + + + + Qmmp OSS4 Output Plugin + + + + + Writen by: Ilya Kotov <forkotov02@hotmail.ru> + + + + + SettingsDialog + + + OSS4 Plugin Settings + + + + + Device: + + + + + Default + + + + 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 @@ + + + + + OutputOSS4Factory + + + OSS4 Plugin + + + + + About OSS4 Output Plugin + + + + + Qmmp OSS4 Output Plugin + + + + + Writen by: Ilya Kotov <forkotov02@hotmail.ru> + + + + + SettingsDialog + + + OSS4 Plugin Settings + + + + + Device: + + + + + Default + + + + 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 @@ + + + + + OutputOSS4Factory + + + OSS4 Plugin + + + + + About OSS4 Output Plugin + + + + + Qmmp OSS4 Output Plugin + + + + + Writen by: Ilya Kotov <forkotov02@hotmail.ru> + + + + + SettingsDialog + + + OSS4 Plugin Settings + + + + + Device: + + + + + Default + + + + 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 @@ + + + + + OutputOSS4Factory + + + OSS4 Plugin + + + + + About OSS4 Output Plugin + + + + + Qmmp OSS4 Output Plugin + + + + + Writen by: Ilya Kotov <forkotov02@hotmail.ru> + + + + + SettingsDialog + + + OSS4 Plugin Settings + + + + + Device: + + + + + Default + + + + 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 @@ + + + + + OutputOSS4Factory + + + OSS4 Plugin + + + + + About OSS4 Output Plugin + + + + + Qmmp OSS4 Output Plugin + + + + + Writen by: Ilya Kotov <forkotov02@hotmail.ru> + + + + + SettingsDialog + + + OSS4 Plugin Settings + + + + + Device: + + + + + Default + + + + 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 @@ + + + + + OutputOSS4Factory + + + OSS4 Plugin + Модуль OSS4 + + + + About OSS4 Output Plugin + Модуль поддержки OSS4 для Qmmp + + + + Qmmp OSS4 Output Plugin + Модуль OSS4 для Qmmp + + + + Writen by: Ilya Kotov <forkotov02@hotmail.ru> + Разработчик: Илья Котов <forkotov02@hotmail.ru> + + + + SettingsDialog + + + OSS4 Plugin Settings + Настройки модуля OSS4 + + + + Device: + Устройство: + + + + Default + По умолчанию + + + 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 @@ + + + + + OutputOSS4Factory + + + OSS4 Plugin + + + + + About OSS4 Output Plugin + + + + + Qmmp OSS4 Output Plugin + + + + + Writen by: Ilya Kotov <forkotov02@hotmail.ru> + + + + + SettingsDialog + + + OSS4 Plugin Settings + + + + + Device: + + + + + Default + + + + 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 @@ + + + + + OutputOSS4Factory + + + OSS4 Plugin + + + + + About OSS4 Output Plugin + + + + + Qmmp OSS4 Output Plugin + + + + + Writen by: Ilya Kotov <forkotov02@hotmail.ru> + + + + + SettingsDialog + + + OSS4 Plugin Settings + + + + + Device: + + + + + Default + + + + 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 @@ + + + + + OutputOSS4Factory + + + OSS4 Plugin + + + + + About OSS4 Output Plugin + + + + + Qmmp OSS4 Output Plugin + + + + + Writen by: Ilya Kotov <forkotov02@hotmail.ru> + + + + + SettingsDialog + + + OSS4 Plugin Settings + + + + + Device: + + + + + Default + + + + 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 @@ + + + + + OutputOSS4Factory + + + OSS4 Plugin + + + + + About OSS4 Output Plugin + + + + + Qmmp OSS4 Output Plugin + + + + + Writen by: Ilya Kotov <forkotov02@hotmail.ru> + + + + + SettingsDialog + + + OSS4 Plugin Settings + + + + + Device: + + + + + Default + + + + 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 @@ + + + + oss4_plugin_it.qm + oss4_plugin_cs.qm + oss4_plugin_de.qm + oss4_plugin_zh_CN.qm + oss4_plugin_zh_TW.qm + oss4_plugin_pl.qm + oss4_plugin_ru.qm + oss4_plugin_uk_UA.qm + oss4_plugin_tr.qm + oss4_plugin_lt.qm + oss4_plugin_nl.qm + oss4_plugin_ja.qm + oss4_plugin_es.qm + + -- cgit v1.2.3-13-gbd6f