aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/gme
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-09-25 09:32:08 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2010-09-25 09:32:08 +0000
commitae7229c3897f3dc106d9547af39086fe68be852b (patch)
treedc7a92685294bc5729b4bcfd0e18a99fbcbada44 /src/plugins/Input/gme
parent63de3bbefb1c8c3cf36be875856ea6b28b33b09f (diff)
downloadqmmp-ae7229c3897f3dc106d9547af39086fe68be852b.tar.gz
qmmp-ae7229c3897f3dc106d9547af39086fe68be852b.tar.bz2
qmmp-ae7229c3897f3dc106d9547af39086fe68be852b.zip
added game music plugin
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1909 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/gme')
-rw-r--r--src/plugins/Input/gme/decoder_gme.cpp99
-rw-r--r--src/plugins/Input/gme/decoder_gme.h49
-rw-r--r--src/plugins/Input/gme/decodergmefactory.cpp108
-rw-r--r--src/plugins/Input/gme/decodergmefactory.h51
-rw-r--r--src/plugins/Input/gme/gme.pro39
-rw-r--r--src/plugins/Input/gme/gmehelper.cpp125
-rw-r--r--src/plugins/Input/gme/gmehelper.h43
-rw-r--r--src/plugins/Input/gme/translations/gme_plugin_cs.ts37
-rw-r--r--src/plugins/Input/gme/translations/gme_plugin_de.ts37
-rw-r--r--src/plugins/Input/gme/translations/gme_plugin_it.ts37
-rw-r--r--src/plugins/Input/gme/translations/gme_plugin_ja.ts37
-rw-r--r--src/plugins/Input/gme/translations/gme_plugin_lt.ts37
-rw-r--r--src/plugins/Input/gme/translations/gme_plugin_nl.ts37
-rw-r--r--src/plugins/Input/gme/translations/gme_plugin_pl.ts37
-rw-r--r--src/plugins/Input/gme/translations/gme_plugin_ru.ts37
-rw-r--r--src/plugins/Input/gme/translations/gme_plugin_tr.ts37
-rw-r--r--src/plugins/Input/gme/translations/gme_plugin_uk_UA.ts37
-rw-r--r--src/plugins/Input/gme/translations/gme_plugin_zh_CN.ts37
-rw-r--r--src/plugins/Input/gme/translations/gme_plugin_zh_TW.ts37
-rw-r--r--src/plugins/Input/gme/translations/translations.qrc17
20 files changed, 975 insertions, 0 deletions
diff --git a/src/plugins/Input/gme/decoder_gme.cpp b/src/plugins/Input/gme/decoder_gme.cpp
new file mode 100644
index 000000000..7dd42101f
--- /dev/null
+++ b/src/plugins/Input/gme/decoder_gme.cpp
@@ -0,0 +1,99 @@
+/***************************************************************************
+ * 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 <qmmp/statehandler.h>
+#include "gmehelper.h"
+#include "decoder_gme.h"
+
+// Decoder class
+DecoderGme::DecoderGme(const QString &path) : Decoder()
+{
+ m_path = path;
+ m_emu = 0;
+}
+
+DecoderGme::~DecoderGme()
+{}
+
+bool DecoderGme::initialize()
+{
+ int track = m_path.section("#", -1).toInt();
+ m_emu = m_helper.load(m_path);
+ if(!m_emu)
+ return false;
+
+ int count = m_emu->track_count();
+ if(track > count + 1 || track < 0)
+ {
+ qWarning("DecoderGme: track number is out of range");
+ delete m_emu;
+ m_emu = 0;
+ return false;
+ }
+ m_emu->start_track(track - 1);
+ track_info_t track_info;
+ if(!m_emu->track_info(&track_info))
+ {
+ if(track_info.length <= 0)
+ track_info.length = track_info.intro_length + track_info.loop_length * 2;
+ }
+ if(track_info.length <= 0)
+ track_info.length = (long) (2.5 * 60 * 1000);
+ if(track_info.length < m_helper.fadeLength())
+ track_info.length += m_helper.fadeLength();
+ m_emu->set_fade(track_info.length - m_helper.fadeLength(), m_helper.fadeLength());
+ QMap<Qmmp::MetaData, QString> metadata;
+ metadata.insert(Qmmp::TITLE, track_info.song);
+ metadata.insert(Qmmp::ARTIST, track_info.author);
+ metadata.insert(Qmmp::COMMENT, track_info.comment);
+ metadata.insert(Qmmp::TRACK, QString("%1").arg(track));
+ metadata.insert(Qmmp::URL, m_path);
+ StateHandler::instance()->dispatch(metadata);
+ m_totalTime = track_info.length;
+ configure(44100, 2);
+ qDebug("DecoderGme: initialize succes");
+ return true;
+}
+
+qint64 DecoderGme::totalTime()
+{
+ return m_totalTime;
+}
+
+void DecoderGme::seek(qint64 pos)
+{
+ m_emu->seek(pos);
+}
+
+int DecoderGme::bitrate()
+{
+ return 8;
+}
+
+qint64 DecoderGme::read(char *data, qint64 size)
+{
+ if(m_emu->track_ended())
+ return 0;
+ if (m_emu->play(size/2, (short*)data))
+ {
+ return 0;
+ }
+ return size;
+}
diff --git a/src/plugins/Input/gme/decoder_gme.h b/src/plugins/Input/gme/decoder_gme.h
new file mode 100644
index 000000000..f53bc66bf
--- /dev/null
+++ b/src/plugins/Input/gme/decoder_gme.h
@@ -0,0 +1,49 @@
+/***************************************************************************
+ * 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 DECODER_GME_H
+#define DECODER_GME_H
+
+#include <gme/Music_Emu.h>
+#include <qmmp/decoder.h>
+
+class GmeHelper;
+
+class DecoderGme : public Decoder
+{
+public:
+ DecoderGme(const QString &path);
+ virtual ~DecoderGme();
+
+ // Standard Decoder API
+ bool initialize();
+ qint64 totalTime();
+ int bitrate();
+ qint64 read(char *data, qint64 size);
+ void seek(qint64);
+
+private:
+ GmeHelper m_helper;
+ Music_Emu *m_emu;
+ qint64 m_totalTime;
+ QString m_path;
+};
+
+#endif // DECODER_GME_H
diff --git a/src/plugins/Input/gme/decodergmefactory.cpp b/src/plugins/Input/gme/decodergmefactory.cpp
new file mode 100644
index 000000000..0745272c2
--- /dev/null
+++ b/src/plugins/Input/gme/decodergmefactory.cpp
@@ -0,0 +1,108 @@
+/***************************************************************************
+ * 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 <QtGui>
+#include <gme/Gme_File.h>
+#include "gmehelper.h"
+#include "decoder_gme.h"
+#include "decodergmefactory.h"
+
+// DecoderGmeFactory
+
+bool DecoderGmeFactory::supports(const QString &source) const
+{
+ QString lExt = source.section(".",-1).toLower();
+ lExt.prepend(".");
+ QStringList lExtList;
+ lExtList << ".ay" << ".gms" << ".gym" << ".hes" << ".kss" << ".nsf" << ".nsfe" << ".sap" << ".spc"
+ << ".vgm" << ".vgz";
+ if (lExtList.contains(lExt))
+ return true;
+ return false;
+}
+
+bool DecoderGmeFactory::canDecode(QIODevice *) const
+{
+ return false;
+}
+
+const DecoderProperties DecoderGmeFactory::properties() const
+{
+ DecoderProperties properties;
+ properties.name = tr("GME Plugin");
+ properties.filter = QString("*.ay *.gms *.gym *.hes *.kss *.nsf *.nsfe *.sap *.spc *.vgm *.vgz");
+ properties.description = tr("Game Music Files");
+ //properties.contentType = ;
+ properties.shortName = "gme";
+ properties.hasAbout = true;
+ properties.hasSettings = true;
+ properties.noInput = true;
+ properties.protocols = "gme";
+ return properties;
+}
+
+Decoder *DecoderGmeFactory::create(const QString &path, QIODevice *input)
+{
+ Q_UNUSED(input);
+ return new DecoderGme(path);
+}
+
+QList<FileInfo *> DecoderGmeFactory::createPlayList(const QString &fileName, bool useMetaData)
+{
+ QList <FileInfo*> list;
+ GmeHelper helper;
+ Music_Emu *emu = helper.load(fileName);
+ if(!emu)
+ {
+ qWarning("DecoderGmeFactory: unable to open file");
+ return list;
+ }
+ list = helper.createPlayList(useMetaData);
+ return list;
+}
+
+MetaDataModel* DecoderGmeFactory::createMetaDataModel(const QString &path, QObject *parent)
+{
+ Q_UNUSED(path);
+ Q_UNUSED(parent);
+ return 0;
+}
+
+void DecoderGmeFactory::showSettings(QWidget *parent)
+{
+ Q_UNUSED(parent);
+}
+
+void DecoderGmeFactory::showAbout(QWidget *parent)
+{
+ QMessageBox::about (parent, tr("About GME Audio Plugin"),
+ tr("Qmmp GME Audio Plugin")+"\n"+
+ tr("This plugin uses Game_Music_Emu library to play game music files")+"\n"+
+ tr("Writen by: Ilya Kotov <forkotov02@hotmail.ru>"));
+}
+
+QTranslator *DecoderGmeFactory::createTranslator(QObject *parent)
+{
+ QTranslator *translator = new QTranslator(parent);
+ QString locale = QLocale::system().name();
+ translator->load(QString(":/gme_plugin_") + locale);
+ return translator;
+}
+Q_EXPORT_PLUGIN2(gme,DecoderGmeFactory)
diff --git a/src/plugins/Input/gme/decodergmefactory.h b/src/plugins/Input/gme/decodergmefactory.h
new file mode 100644
index 000000000..2ab17b8db
--- /dev/null
+++ b/src/plugins/Input/gme/decodergmefactory.h
@@ -0,0 +1,51 @@
+/***************************************************************************
+ * 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 DECODERGMEFACTORY_H
+#define DECODERGMEFACTORY_H
+
+#include <QObject>
+#include <QString>
+#include <QIODevice>
+#include <QWidget>
+
+#include <qmmp/decoder.h>
+#include <qmmp/output.h>
+#include <qmmp/decoderfactory.h>
+#include <qmmp/fileinfo.h>
+
+
+class DecoderGmeFactory : public QObject, DecoderFactory
+{
+ Q_OBJECT
+ Q_INTERFACES(DecoderFactory);
+
+public:
+ bool supports(const QString &source) const;
+ bool canDecode(QIODevice *input) const;
+ const DecoderProperties properties() const;
+ Decoder *create(const QString &path, QIODevice *input);
+ QList<FileInfo *> createPlayList(const QString &fileName, bool useMetaData);
+ MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0);
+ void showSettings(QWidget *parent);
+ void showAbout(QWidget *parent);
+ QTranslator *createTranslator(QObject *parent);
+};
+
+#endif
diff --git a/src/plugins/Input/gme/gme.pro b/src/plugins/Input/gme/gme.pro
new file mode 100644
index 000000000..a6602ee78
--- /dev/null
+++ b/src/plugins/Input/gme/gme.pro
@@ -0,0 +1,39 @@
+include(../../plugins.pri)
+
+HEADERS += decodergmefactory.h \
+ decoder_gme.h \
+ gmehelper.h
+SOURCES += decoder_gme.cpp \
+ decodergmefactory.cpp \
+ gmehelper.cpp
+TARGET = $$PLUGINS_PREFIX/Input/gme
+QMAKE_CLEAN = $$PLUGINS_PREFIX/Input/libgme.so
+INCLUDEPATH += ../../../
+CONFIG += release \
+ warn_on \
+ plugin
+TEMPLATE = lib
+QMAKE_LIBDIR += ../../../../lib
+LIBS += -lqmmp \
+ -L/usr/lib \
+ -L/usr/local/lib \
+ -I/usr/include \
+ -I/usr/local/include \
+ -lgme
+TRANSLATIONS = translations/gme_plugin_it.ts \
+ translations/gme_plugin_ru.ts \
+ translations/gme_plugin_cs.ts \
+ translations/gme_plugin_de.ts \
+ translations/gme_plugin_zh_CN.ts \
+ translations/gme_plugin_zh_TW.ts \
+ translations/gme_plugin_uk_UA.ts \
+ translations/gme_plugin_pl.ts \
+ translations/gme_plugin_tr.ts \
+ translations/gme_plugin_lt.ts \
+ translations/gme_plugin_nl.ts \
+ translations/gme_plugin_ja.ts
+
+RESOURCES = translations/translations.qrc
+isEmpty (LIB_DIR):LIB_DIR = /lib
+target.path = $$LIB_DIR/qmmp/Input
+INSTALLS += target
diff --git a/src/plugins/Input/gme/gmehelper.cpp b/src/plugins/Input/gme/gmehelper.cpp
new file mode 100644
index 000000000..120dcdd1f
--- /dev/null
+++ b/src/plugins/Input/gme/gmehelper.cpp
@@ -0,0 +1,125 @@
+/***************************************************************************
+ * 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 "gmehelper.h"
+
+#define FADE_LENGTH 8000
+
+GmeHelper::GmeHelper()
+{
+ m_emu = 0;
+}
+
+GmeHelper::~GmeHelper()
+{
+ if(m_emu)
+ delete m_emu;
+ m_emu = 0;
+}
+
+Music_Emu *GmeHelper::load(const QString &url, int sample_rate)
+{
+ if(m_emu)
+ delete m_emu;
+ m_emu = 0;
+ QString path = url;
+ if(url.contains("://"))
+ {
+ path = QUrl(url).path();
+ path.replace(QString(QUrl::toPercentEncoding("#")), "#");
+ path.replace(QString(QUrl::toPercentEncoding("?")), "?");
+ path.replace(QString(QUrl::toPercentEncoding("%")), "%");
+ }
+ const char *err = 0;
+ gme_type_t file_type;
+ if((err = gme_identify_file(qPrintable(path),&file_type)))
+ {
+ qWarning("GmeHelper: %s", err);
+ return 0;
+ }
+ if(!file_type)
+ {
+ qWarning("DecoderGme: unsupporetd music type");
+ return 0;
+ }
+ if(!(m_emu = file_type->new_emu()))
+ {
+ qWarning("GmeHelper: out of memory");
+ return 0;
+ }
+ if((err = m_emu->set_sample_rate(sample_rate)))
+ {
+ qWarning("GmeHelper: %s", err);
+ return 0;
+ }
+ if((err = m_emu->load_file(qPrintable(path))))
+ {
+ qWarning("GmeHelper: %s", err);
+ return 0;
+ }
+ QString m3u_path = path.left(path.lastIndexOf("."));
+ m3u_path.append(".m3u");
+ m_emu->load_m3u(qPrintable(m3u_path));
+ m_path = path;
+ return m_emu;
+}
+
+QList <FileInfo*> GmeHelper::createPlayList(bool meta)
+{
+ QList <FileInfo*> list;
+ if(!m_emu)
+ return list;
+ int count = m_emu->track_count();
+ track_info_t track_info;
+ for(int i = 0; i < count; ++i)
+ {
+ FileInfo *info = new FileInfo();
+ m_emu->start_track(i);
+ if(!m_emu->track_info(&track_info))
+ {
+ if(track_info.length <= 0)
+ track_info.length = track_info.intro_length + track_info.loop_length * 2;
+ }
+ if(track_info.length <= 0)
+ track_info.length = (long) (2.5 * 60 * 1000);
+ if(track_info.length < FADE_LENGTH)
+ track_info.length += FADE_LENGTH;
+ if(meta)
+ {
+ info->setMetaData(Qmmp::TITLE, track_info.song);
+ info->setMetaData(Qmmp::ARTIST, track_info.author);
+ info->setMetaData(Qmmp::COMMENT, track_info.comment);
+ info->setMetaData(Qmmp::TRACK, i+1);
+ }
+ QString path = m_path;
+ path.replace("%", QString(QUrl::toPercentEncoding("%"))); //replace special symbols
+ path.replace("#", QString(QUrl::toPercentEncoding("#")));
+ path.replace("?", QString(QUrl::toPercentEncoding("?")));
+ info->setPath("gme://"+path+QString("#%1").arg(i+1));
+ info->setLength(track_info.length/1000);
+ list << info;
+ }
+ return list;
+}
+
+int GmeHelper::fadeLength()
+{
+ return FADE_LENGTH;
+}
diff --git a/src/plugins/Input/gme/gmehelper.h b/src/plugins/Input/gme/gmehelper.h
new file mode 100644
index 000000000..f326b4a7c
--- /dev/null
+++ b/src/plugins/Input/gme/gmehelper.h
@@ -0,0 +1,43 @@
+/***************************************************************************
+ * 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 GMEHELPER_H
+#define GMEHELPER_H
+
+#include <QString>
+#include <QList>
+#include <gme/Music_Emu.h>
+#include <qmmp/fileinfo.h>
+
+class GmeHelper
+{
+public:
+ GmeHelper();
+ ~GmeHelper();
+ Music_Emu *load(const QString &url, int sample_rate = 44100);
+ QList <FileInfo*> createPlayList(bool meta);
+ int fadeLength();
+
+private:
+ Music_Emu *m_emu;
+ QString m_path;
+};
+
+#endif // GMEHELPER_H
diff --git a/src/plugins/Input/gme/translations/gme_plugin_cs.ts b/src/plugins/Input/gme/translations/gme_plugin_cs.ts
new file mode 100644
index 000000000..1c24ba04f
--- /dev/null
+++ b/src/plugins/Input/gme/translations/gme_plugin_cs.ts
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="cs">
+<context>
+ <name>DecoderGmeFactory</name>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="50"/>
+ <source>GME Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="52"/>
+ <source>Game Music Files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="97"/>
+ <source>About GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="98"/>
+ <source>Qmmp GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="99"/>
+ <source>This plugin uses Game_Music_Emu library to play game music files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="100"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished">Autor: Ilja Kotov &lt;forkotov02@hotmail.ru&gt;</translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Input/gme/translations/gme_plugin_de.ts b/src/plugins/Input/gme/translations/gme_plugin_de.ts
new file mode 100644
index 000000000..35bcaff49
--- /dev/null
+++ b/src/plugins/Input/gme/translations/gme_plugin_de.ts
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="de_DE">
+<context>
+ <name>DecoderGmeFactory</name>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="50"/>
+ <source>GME Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="52"/>
+ <source>Game Music Files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="97"/>
+ <source>About GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="98"/>
+ <source>Qmmp GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="99"/>
+ <source>This plugin uses Game_Music_Emu library to play game music files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="100"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished">Autor: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Input/gme/translations/gme_plugin_it.ts b/src/plugins/Input/gme/translations/gme_plugin_it.ts
new file mode 100644
index 000000000..62e58ad03
--- /dev/null
+++ b/src/plugins/Input/gme/translations/gme_plugin_it.ts
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="it">
+<context>
+ <name>DecoderGmeFactory</name>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="50"/>
+ <source>GME Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="52"/>
+ <source>Game Music Files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="97"/>
+ <source>About GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="98"/>
+ <source>Qmmp GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="99"/>
+ <source>This plugin uses Game_Music_Emu library to play game music files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="100"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished">Autore: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Input/gme/translations/gme_plugin_ja.ts b/src/plugins/Input/gme/translations/gme_plugin_ja.ts
new file mode 100644
index 000000000..a09e8f377
--- /dev/null
+++ b/src/plugins/Input/gme/translations/gme_plugin_ja.ts
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ja_JP">
+<context>
+ <name>DecoderGmeFactory</name>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="50"/>
+ <source>GME Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="52"/>
+ <source>Game Music Files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="97"/>
+ <source>About GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="98"/>
+ <source>Qmmp GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="99"/>
+ <source>This plugin uses Game_Music_Emu library to play game music files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="100"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished">制作: Илья Котов (Ilya Kotov) &lt;forkotov02@hotmail.ru&gt;</translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Input/gme/translations/gme_plugin_lt.ts b/src/plugins/Input/gme/translations/gme_plugin_lt.ts
new file mode 100644
index 000000000..8a48fcbbf
--- /dev/null
+++ b/src/plugins/Input/gme/translations/gme_plugin_lt.ts
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="lt">
+<context>
+ <name>DecoderGmeFactory</name>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="50"/>
+ <source>GME Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="52"/>
+ <source>Game Music Files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="97"/>
+ <source>About GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="98"/>
+ <source>Qmmp GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="99"/>
+ <source>This plugin uses Game_Music_Emu library to play game music files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="100"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished">Sukūrė: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Input/gme/translations/gme_plugin_nl.ts b/src/plugins/Input/gme/translations/gme_plugin_nl.ts
new file mode 100644
index 000000000..8d82e5124
--- /dev/null
+++ b/src/plugins/Input/gme/translations/gme_plugin_nl.ts
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="nl">
+<context>
+ <name>DecoderGmeFactory</name>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="50"/>
+ <source>GME Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="52"/>
+ <source>Game Music Files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="97"/>
+ <source>About GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="98"/>
+ <source>Qmmp GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="99"/>
+ <source>This plugin uses Game_Music_Emu library to play game music files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="100"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished">Auteur: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Input/gme/translations/gme_plugin_pl.ts b/src/plugins/Input/gme/translations/gme_plugin_pl.ts
new file mode 100644
index 000000000..d733bfb86
--- /dev/null
+++ b/src/plugins/Input/gme/translations/gme_plugin_pl.ts
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="pl">
+<context>
+ <name>DecoderGmeFactory</name>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="50"/>
+ <source>GME Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="52"/>
+ <source>Game Music Files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="97"/>
+ <source>About GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="98"/>
+ <source>Qmmp GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="99"/>
+ <source>This plugin uses Game_Music_Emu library to play game music files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="100"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished">Autor: Ilja Kotov &lt;forkotov02@hotmail.ru&gt;</translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Input/gme/translations/gme_plugin_ru.ts b/src/plugins/Input/gme/translations/gme_plugin_ru.ts
new file mode 100644
index 000000000..4ca68a016
--- /dev/null
+++ b/src/plugins/Input/gme/translations/gme_plugin_ru.ts
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="ru">
+<context>
+ <name>DecoderGmeFactory</name>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="50"/>
+ <source>GME Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="52"/>
+ <source>Game Music Files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="97"/>
+ <source>About GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="98"/>
+ <source>Qmmp GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="99"/>
+ <source>This plugin uses Game_Music_Emu library to play game music files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="100"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished">Разработчик: Илья Котов &lt;forkotov02@hotmail.ru&gt;</translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Input/gme/translations/gme_plugin_tr.ts b/src/plugins/Input/gme/translations/gme_plugin_tr.ts
new file mode 100644
index 000000000..235adeb74
--- /dev/null
+++ b/src/plugins/Input/gme/translations/gme_plugin_tr.ts
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="tr_TR">
+<context>
+ <name>DecoderGmeFactory</name>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="50"/>
+ <source>GME Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="52"/>
+ <source>Game Music Files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="97"/>
+ <source>About GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="98"/>
+ <source>Qmmp GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="99"/>
+ <source>This plugin uses Game_Music_Emu library to play game music files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="100"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished">Yazan: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Input/gme/translations/gme_plugin_uk_UA.ts b/src/plugins/Input/gme/translations/gme_plugin_uk_UA.ts
new file mode 100644
index 000000000..ec7495104
--- /dev/null
+++ b/src/plugins/Input/gme/translations/gme_plugin_uk_UA.ts
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="uk">
+<context>
+ <name>DecoderGmeFactory</name>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="50"/>
+ <source>GME Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="52"/>
+ <source>Game Music Files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="97"/>
+ <source>About GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="98"/>
+ <source>Qmmp GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="99"/>
+ <source>This plugin uses Game_Music_Emu library to play game music files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="100"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished">Розробник: Ілля Котов &lt;forkotov02@hotmail.ru&gt;</translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Input/gme/translations/gme_plugin_zh_CN.ts b/src/plugins/Input/gme/translations/gme_plugin_zh_CN.ts
new file mode 100644
index 000000000..b0bb6b413
--- /dev/null
+++ b/src/plugins/Input/gme/translations/gme_plugin_zh_CN.ts
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="zh_CN">
+<context>
+ <name>DecoderGmeFactory</name>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="50"/>
+ <source>GME Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="52"/>
+ <source>Game Music Files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="97"/>
+ <source>About GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="98"/>
+ <source>Qmmp GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="99"/>
+ <source>This plugin uses Game_Music_Emu library to play game music files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="100"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished">作者:Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Input/gme/translations/gme_plugin_zh_TW.ts b/src/plugins/Input/gme/translations/gme_plugin_zh_TW.ts
new file mode 100644
index 000000000..0d0996229
--- /dev/null
+++ b/src/plugins/Input/gme/translations/gme_plugin_zh_TW.ts
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="zh_TW">
+<context>
+ <name>DecoderGmeFactory</name>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="50"/>
+ <source>GME Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="52"/>
+ <source>Game Music Files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="97"/>
+ <source>About GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="98"/>
+ <source>Qmmp GME Audio Plugin</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="99"/>
+ <source>This plugin uses Game_Music_Emu library to play game music files</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../decodergmefactory.cpp" line="100"/>
+ <source>Writen by: Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</source>
+ <translation type="unfinished">作者:Ilya Kotov &lt;forkotov02@hotmail.ru&gt;</translation>
+ </message>
+</context>
+</TS>
diff --git a/src/plugins/Input/gme/translations/translations.qrc b/src/plugins/Input/gme/translations/translations.qrc
new file mode 100644
index 000000000..4bb87fa70
--- /dev/null
+++ b/src/plugins/Input/gme/translations/translations.qrc
@@ -0,0 +1,17 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource>
+ <file>gme_plugin_it.qm</file>
+ <file>gme_plugin_ru.qm</file>
+ <file>gme_plugin_uk_UA.qm</file>
+ <file>gme_plugin_zh_CN.qm</file>
+ <file>gme_plugin_zh_TW.qm</file>
+ <file>gme_plugin_cs.qm</file>
+ <file>gme_plugin_de.qm</file>
+ <file>gme_plugin_pl.qm</file>
+ <file>gme_plugin_tr.qm</file>
+ <file>gme_plugin_lt.qm</file>
+ <file>gme_plugin_nl.qm</file>
+ <file>gme_plugin_ja.qm</file>
+ </qresource>
+</RCC>