Qmmp: add recipe for version 1.1.12

This commit is contained in:
Gerasim Troeglazov
2017-11-22 18:25:16 +10:00
parent 7f64f9d97f
commit d63fbded40
3 changed files with 897 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
resource app_flags B_SINGLE_LAUNCH;
resource app_version {
major = @MAJOR@,
middle = @MIDDLE@,
minor = @MINOR@,
variety = B_APPV_FINAL,
internal = 0,
short_info = "Qmmp",
long_info = "@LONG_INFO@"
};
resource app_signature "@APP_SIGNATURE@";
resource file_types message {
"types" = "application/x-asf",
"types" = "audio"
};
resource vector_icon {
$"6E636966030514059105F606000BBEE6B3E7BEE6B3E7C12AB3BAC57CB53FC378"
$"B436C822B698CB3D36CA3BB8F9CC0BBDF2CB9AC29DCC2CC05DCAECC55BC6E4C9"
$"70C936C7D3C421CB63BD3CCB5DC089CC20BA75CAC3B62FC6E1B7E6C927B513C5"
$"6BB3F9C1E5B44DC3B3B37DBF7DB4E8BABAB3DBBCF0B61AB830BACAB4F9B83BB6"
$"1DBC15B460BEE6B3E7BD7CB40CBEE6B3E7022EBF61B611C0B9B56CBEB8B66FBE"
$"15B7DEBE13B70EBE24B8C5BF2ABA3FBEB5B981BF23BA49BF0DBA66BF14BA5CBF"
$"33BAD4BF94BBA9BF74BB38BF6FBBE4BF28BC5ABF4BBC1FBEF3BC59BE8BBC51BE"
$"BEBC5FBE2BBC23BD81BBA3BDE0BBD4BCF4BB4CBBACBB72BC48BB75BA02BB93B6"
$"C4BC7AB847BBB4B60DBCDDB559BE68B55ABD8AB576BEEFB672BF6EB605BF30B6"
$"E5BFB2B7D5C028B775BFC7B7EAC077B811C114B7D4C0D4B84AC171B914C1A9B8"
$"C4C16BB96EC1F4BA53C1EAB9E8C1DCBA5BC232BA20C2B3BA3DC273B9F1C310BA"
$"4FC3CFBA0DC383BB04C4A0BCABC5FFBBEFC537BCEAC63CBCCEC6E6BCCFC699BC"
$"BBC7A5BCBEC923BCC1C864BCCBC946BCF9C985BCD1C974BD6DC98BBE0FC8D8BD"
$"DDC93EBE2EC89CBDEBC829BE19C856BDCAC7DABDCAC731BDC1C785BE1EC72FBE"
$"C6C73EBE73C74BBF32C702BFC2C63CBF69C68DBFD8C63AC005C63BBFEFC63AC0"
$"3BC69DC0E0C739C081C6FDC138C745C1EBC737C192C739C1EEC780C1D2C810C1"
$"F6C7CDC1B1C859C1D1C8F6C17EC8B8C237C8B9C2F2C823C294C86DC2FFC77DC2"
$"ECC632C2E0C6D7C3B5C531C59DC37CC4EBC492C5EEC2F5C56DC1F0C564C279C5"
$"D3C1D6C6A1C1A8C649C1ECC6F5C165C7B1C108C77AC170C7F4C0B9C81CBFF8C7"
$"B4C02AC8CEBF95CA2CBEC0C99EBF59CA78BE74CA2FBDA9CA58BDFEC9CCBCDBC8"
$"29BC1EC8F7BC67C70EBBC7C4C1BB7BC5EABB89C52ABB0E50BA61C5C0BAD8C6BE"
$"B9B5C641B7DEC6C6B89BC5B3B6EDC3B4B5F8C4B6B655C251B581020DBF61B611"
$"BEB8B66FC0B9B56CC3B4B5F8C251B581C4B6B655C641B7DEC5B3B6EDC6C6B89B"
$"50BA61C6BEB9B5C5C0BAD8C4C1BB7BC52ABB0EC420BB7CC2DDBB78C37FBB71C2"
$"4ABB7DC16BBC3BC1DDBBEBC12CBC6DC084BC59C0CEBC7DC059BC1FC025BB95C0"
$"2ABBDEC046BB21C0A8BA45C090BABDC034BA9BBFDFBBABC01FBB33BFA4BB31BF"
$"2ABA3FBF73BAB2BEB5B981BE15B7DEBE24B8C5BE13B70E0212C829BC1EC7E3BC"
$"BAC8F7BC67CA2FBDA9C9CCBCDBCA58BDFECA2CBEC0CA78BE74C99EBF59C81CBF"
$"F8C8CEBF95C7B4C02AC7B1C108C7F4C0B9C77AC170C6A1C1A8C6F5C165C649C1"
$"ECC56DC1F0C5D3C1D6C564C279C59DC37CC5EEC2F5C4EBC492C2ECC632C3B5C5"
$"31C2E0C6D7C2F2C823C2FFC77DC294C86DC1D1C8F6C237C8B9C17EC8B8C1D2C8"
$"10C1B1C859C1F6C7CDC1EBC737C1EEC780C192C739C0E0C739C138C745C081C6"
$"FDC005C63BC03BC69DC120C54FC329C344C22DC451C3F3C27DC53BC0AFC493C1"
$"92C5DCBFBBC721BDD3C688BECCC781BD460204BDEBC829BD90C886BE19C856BE"
$"0FC8D8BE2EC89CBDDDC93EBCF9C985BD6DC98BBCD1C974BCBEC923BCCBC946BD"
$"28C8D60223BF0DBA66BF33BAD4BF14BA5CBF2ABA3FBF23BA49BF73BAB2BFDFBB"
$"ABBFA4BB31C01FBB33C0A8BA45C034BA9BC090BABDC025BB95C046BB21C02ABB"
$"DEC084BC59C059BC1FC0CEBC7DC16BBC3BC12CBC6DC1DDBBEBC2DDBB78C24ABB"
$"7DC37FBB71C4C1BB7BC420BB7CC5EABB89C829BC1EC70EBBC7C7E3BCBAC721BD"
$"D3C781BD46C688BECCC53BC0AFC5DCBFBBC493C192C329C344C3F3C27DC22DC4"
$"51C005C63BC120C54FBFEFC63ABFC2C63CBFD8C63ABF69C68DBEC6C73EBF32C7"
$"02BE73C74BBDCAC731BE1EC72FBDC1C785BDEBC829BDCAC7DABD90C886BCBEC9"
$"23BD28C8D6BCC1C864BCCEC6E6BCBBC7A5BCCFC699BCABC5FFBCEAC63CBBEFC5"
$"37BA4FC3CFBB04C4A0BA0DC383BA20C2B3B9F1C310BA3DC273BA53C1EABA5BC2"
$"32B9E8C1DCB914C1A9B96EC1F4B8C4C16BB811C114B84AC171B7D4C0D4B7D5C0"
$"28B7EAC077B775BFC7B672BF6EB6E5BFB2B605BF30B559BE68B576BEEFB55ABD"
$"8AB6C4BC7AB60DBCDDB847BBB4BBACBB72BA02BB93BC48BB75BD81BBA3BCF4BB"
$"4CBDE0BBD4BE8BBC51BE2BBC23BEBEBC5FBF28BC5ABEF3BC59BF4BBC1FBF94BB"
$"A9BF6FBBE4BF74BB38050A00020001000A010102000A010103000A010104000A"
$"02010500"
};

View File

@@ -0,0 +1,717 @@
From 62ab55037c834ee901189b87f5d65248f8ae3365 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 22 Nov 2017 16:41:34 +1000
Subject: Fix build for Haiku
diff --git a/qmmp.pri b/qmmp.pri
index 1146cad..f46c649 100644
--- a/qmmp.pri
+++ b/qmmp.pri
@@ -7,7 +7,9 @@ OBJECTS_DIR=./.build/obj
RCC_DIR=./.build/rcc
QT += widgets
+unix:!haiku {
DEFINES += QMMP_WS_X11
+}
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050400
diff --git a/src/app/app.pro b/src/app/app.pro
index 2598cf8..cb5b47a 100644
--- a/src/app/app.pro
+++ b/src/app/app.pro
@@ -16,6 +16,7 @@ OBJECTS_DIR = ./.build/obj
QT += network
unix:TARGET = ../../bin/qmmp
win32:TARGET = ../../../bin/qmmp
+haiku:TARGET = ../../Qmmp
CONFIG += thread \
warn_on
QMAKE_LIBDIR += ../../lib \
diff --git a/src/plugins/Effect/Effect.pro b/src/plugins/Effect/Effect.pro
index 417c06b..82a0c4f 100644
--- a/src/plugins/Effect/Effect.pro
+++ b/src/plugins/Effect/Effect.pro
@@ -3,9 +3,11 @@ TEMPLATE = subdirs
SUBDIRS += crossfade stereo
+!haiku {
contains(CONFIG, BS2B_PLUGIN):SUBDIRS += bs2b
contains(CONFIG, SOXR_PLUGIN):SUBDIRS += soxr
+}
-unix {
+unix:!haiku {
contains(CONFIG, LADSPA_PLUGIN):SUBDIRS += ladspa
}
diff --git a/src/plugins/General/General.pro b/src/plugins/General/General.pro
index 03727ba..923aaf1 100644
--- a/src/plugins/General/General.pro
+++ b/src/plugins/General/General.pro
@@ -8,20 +8,20 @@ SUBDIRS += statusicon \
covermanager \
streambrowser \
trackchange \
- hotkey \
copypaste \
rgscan
-unix:SUBDIRS += mpris \
+unix:!haiku:SUBDIRS += mpris \
+ hotkey \
kdenotify \
converter \
gnomehotkey
contains(CONFIG, UDISKS2_PLUGIN){
- unix:SUBDIRS += udisks2
+ unix:!haiku:SUBDIRS += udisks2
}
contains(CONFIG, HAL_PLUGIN){
- unix:SUBDIRS += hal
+ unix:!haiku:SUBDIRS += hal
}
TEMPLATE = subdirs
diff --git a/src/plugins/Input/Input.pro b/src/plugins/Input/Input.pro
index 887f126..c771588 100644
--- a/src/plugins/Input/Input.pro
+++ b/src/plugins/Input/Input.pro
@@ -19,6 +19,7 @@ contains(CONFIG, FFMPEG_PLUGIN){
SUBDIRS += ffmpeg
}
+!haiku {
contains(CONFIG, GME_PLUGIN){
SUBDIRS += gme
}
@@ -34,6 +35,7 @@ contains(CONFIG, CDAUDIO_PLUGIN){
contains(CONFIG, SID_PLUGIN){
SUBDIRS += sid
}
+}
unix{
@@ -42,8 +44,10 @@ contains(CONFIG, AAC_PLUGIN){
}
+!haiku {
contains(CONFIG, WILDMIDI_PLUGIN){
SUBDIRS += wildmidi
}
+}
}
diff --git a/src/plugins/Output/Output.pro b/src/plugins/Output/Output.pro
index c60ea4c..ff8cf91 100644
--- a/src/plugins/Output/Output.pro
+++ b/src/plugins/Output/Output.pro
@@ -7,7 +7,7 @@ win32:SUBDIRS += wasapi
SUBDIRS += null
-unix{
+unix:!haiku{
contains(CONFIG, JACK_PLUGIN){
SUBDIRS += jack
@@ -31,9 +31,13 @@ contains(CONFIG, OSS4_PLUGIN){
}
+haiku{
+ SUBDIRS += mediakit
+}
+
#all platforms
qtHaveModule(multimedia){
contains(CONFIG, QTMULTIMEDIA_PLUGIN){
- SUBDIRS += qtmultimedia
+ !haiku:SUBDIRS += qtmultimedia
}
}
diff --git a/src/plugins/Ui/skinned/skinned.pro b/src/plugins/Ui/skinned/skinned.pro
index bdad79b..f2a8843 100644
--- a/src/plugins/Ui/skinned/skinned.pro
+++ b/src/plugins/Ui/skinned/skinned.pro
@@ -128,7 +128,7 @@ win32:LIBS += -lqmmp0 -lqmmpui0
RESOURCES = resources/resources.qrc glare/glare.qrc
-unix{
+unix:!haiku{
isEmpty(LIB_DIR){
LIB_DIR = /lib
}
diff --git a/src/plugins/Ui/skinned/symboldisplay.cpp b/src/plugins/Ui/skinned/symboldisplay.cpp
index 2fd5893..ea6f231 100644
--- a/src/plugins/Ui/skinned/symboldisplay.cpp
+++ b/src/plugins/Ui/skinned/symboldisplay.cpp
@@ -32,7 +32,7 @@ SymbolDisplay::SymbolDisplay (QWidget *parent, int digits)
connect (m_skin, SIGNAL (skinChanged()), this, SLOT (draw()));
draw();
for (int i=0; i<m_digits; ++i)
-#if defined(Q_OS_FREEBSD) || defined(Q_OS_WIN) || defined (Q_OS_MAC)
+#if defined(Q_OS_FREEBSD) || defined(Q_OS_WIN) || defined (Q_OS_MAC) || defined (Q_OS_HAIKU)
m_max += 9 * (int) pow(10,i);
#else
m_max += 9 * (int) exp10(i);
diff --git a/src/plugins/Visual/Visual.pro b/src/plugins/Visual/Visual.pro
index e3f6d5e..1150b9a 100644
--- a/src/plugins/Visual/Visual.pro
+++ b/src/plugins/Visual/Visual.pro
@@ -3,5 +3,5 @@ TEMPLATE = subdirs
SUBDIRS += analyzer
contains(CONFIG, PROJECTM_PLUGIN){
- SUBDIRS += projectm
+ !haiku:SUBDIRS += projectm
}
diff --git a/src/plugins/plugins.pri b/src/plugins/plugins.pri
index 1805bf5..3eae194 100644
--- a/src/plugins/plugins.pri
+++ b/src/plugins/plugins.pri
@@ -1,5 +1,6 @@
include(../../qmmp.pri)
unix:PLUGINS_PREFIX=../../../../lib/qmmp
win32:PLUGINS_PREFIX=../../../../../bin/plugins
+haiku:PLUGINS_PREFIX=../../../../plugins
INCLUDEPATH += ../../../qmmp
CONFIG += hide_symbols
diff --git a/src/qmmp/qmmp.cpp b/src/qmmp/qmmp.cpp
index 777a290..92323d0 100644
--- a/src/qmmp/qmmp.cpp
+++ b/src/qmmp/qmmp.cpp
@@ -56,6 +56,8 @@ const QString Qmmp::configDir()
}
else
return m_configDir;
+#elif defined(Q_OS_HAIKU)
+ return m_configDir.isEmpty() ? QDir::homePath() +"/config/settings/Qmmp/" : m_configDir;
#else
return m_configDir.isEmpty() ? QDir::homePath() +"/.qmmp/" : m_configDir;
#endif
@@ -93,7 +95,7 @@ const QString Qmmp::pluginsPath()
QDir dir(QMMP_INSTALL_PREFIX "/" LIB_DIR "/qmmp");
//qDebug(QMMP_INSTALL_PREFIX"/"LIB_DIR"/qmmp");
#else
-#if defined(Q_OS_WIN) && !defined(Q_OS_CYGWIN)
+#if defined(Q_OS_WIN) && !defined(Q_OS_CYGWIN) || defined(Q_OS_HAIKU)
QDir dir(qApp->applicationDirPath() + "/plugins");
#else
QDir dir(qApp->applicationDirPath() + "/../" LIB_DIR "/qmmp");
diff --git a/src/qmmpui/configdialog.cpp b/src/qmmpui/configdialog.cpp
index 894191e..9aefb3a 100644
--- a/src/qmmpui/configdialog.cpp
+++ b/src/qmmpui/configdialog.cpp
@@ -61,6 +61,9 @@ ConfigDialog::ConfigDialog (QWidget *parent) : QDialog (parent)
m_insert_row = 0;
setAttribute(Qt::WA_QuitOnClose, false);
setAttribute(Qt::WA_DeleteOnClose, false);
+#if defined(Q_OS_HAIKU)
+ setWindowModality(Qt::NonModal);
+#endif
m_ui->preferencesButton->setEnabled(false);
m_ui->informationButton->setEnabled(false);
m_ui->treeWidget->setItemDelegate(new RadioItemDelegate(this));
--
2.15.0
From 729994441ffae6ed2cd890069c9b658f7d1b77d0 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 22 Nov 2017 17:12:04 +1000
Subject: Add MidiaKit output plugin
diff --git a/src/plugins/Output/mediakit/CMakeLists.txt b/src/plugins/Output/mediakit/CMakeLists.txt
new file mode 100644
index 0000000..55c1bdc
--- /dev/null
+++ b/src/plugins/Output/mediakit/CMakeLists.txt
@@ -0,0 +1,58 @@
+project(libmediakit)
+
+cmake_minimum_required(VERSION 2.4.7)
+
+if(COMMAND cmake_policy)
+cmake_policy(SET CMP0003 NEW)
+endif(COMMAND cmake_policy)
+
+# qt plugin
+ADD_DEFINITIONS( -Wall )
+ADD_DEFINITIONS(${QT_DEFINITIONS})
+ADD_DEFINITIONS(-DQT_PLUGIN)
+ADD_DEFINITIONS(-DQT_NO_DEBUG)
+ADD_DEFINITIONS(-DQT_SHARED)
+ADD_DEFINITIONS(-DQT_THREAD)
+
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+SET(QT_INCLUDES
+ ${QT_INCLUDES}
+ ${CMAKE_CURRENT_SOURCE_DIR}/../../../
+)
+
+# libqmmp
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../)
+link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmp)
+
+SET(libmediakit_SRCS
+ outputmediakit.cpp
+ outputmediakitfactory.cpp
+)
+
+SET(libmediakit_MOC_HDRS
+ outputmediakitfactory.h
+)
+
+SET(libmediakit_HDRS
+ outputmediakit.h
+)
+
+SET(libmediakit_RCCS translations/translations.qrc)
+
+QT4_ADD_RESOURCES(libmediakit_RCC_SRCS ${libmediakit_RCCS})
+
+QT4_WRAP_CPP(libmediakit_MOC_SRCS ${libmediakit_MOC_HDRS})
+
+
+# Don't forget to include output directory, otherwise
+# the UI file won't be wrapped!
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+ADD_LIBRARY(mediakit MODULE ${libmediakit_SRCS} ${libmediakit_MOC_SRCS} ${libmediakit_UIS_H}
+ ${libmediakit_RCC_SRCS} ${libmediakit_HDRS})
+add_dependencies(mediakit qmmp)
+target_link_libraries(mediakit ${QT_LIBRARIES} -lqmmp -lbe -lmedia -lgame)
+install(TARGETS mediakit DESTINATION ${LIB_DIR}/qmmp/Output)
+
+
diff --git a/src/plugins/Output/mediakit/mediakit.pro b/src/plugins/Output/mediakit/mediakit.pro
new file mode 100644
index 0000000..d18625e
--- /dev/null
+++ b/src/plugins/Output/mediakit/mediakit.pro
@@ -0,0 +1,31 @@
+include(../../plugins.pri)
+
+HEADERS += outputmediakitfactory.h \
+ outputmediakit.h
+
+SOURCES += outputmediakitfactory.cpp \
+ outputmediakit.cpp
+
+
+TARGET=$$PLUGINS_PREFIX/Output/mediakit
+QMAKE_CLEAN =$$PLUGINS_PREFIX/Output/libmediakit.so
+
+INCLUDEPATH += ../../../
+QMAKE_LIBDIR += ../../../../lib
+
+CONFIG += warn_on \
+thread \
+plugin \
+link_pkgconfig
+
+TEMPLATE = lib
+LIBS += -lqmmp -lbe -lmedia
+
+RESOURCES = translations/translations.qrc
+
+isEmpty (LIB_DIR){
+LIB_DIR = /lib
+}
+
+target.path = $$LIB_DIR/qmmp/Output
+INSTALLS += target
diff --git a/src/plugins/Output/mediakit/outputmediakit.cpp b/src/plugins/Output/mediakit/outputmediakit.cpp
new file mode 100644
index 0000000..b0ea1b6
--- /dev/null
+++ b/src/plugins/Output/mediakit/outputmediakit.cpp
@@ -0,0 +1,137 @@
+/***************************************************************************
+ * Copyright (C) 2013-2015 by Gerasim Troeglazov *
+ * 3dEyes@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., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include "outputmediakit.h"
+
+#include <SoundPlayer.h>
+#include <GameKit.h>
+#include <SupportKit.h>
+#include <game/GameSoundDefs.h>
+#include <game/PushGameSound.h>
+#include <game/StreamingGameSound.h>
+#include <media/MediaDefs.h>
+
+static void playerProc(void *cookie, void *buffer, size_t len, const media_raw_audio_format &format)
+{
+ OutputMediaKit *obj = (OutputMediaKit*)cookie;
+
+ acquire_sem(obj->block_sem);
+ memcpy(buffer, obj->outbuf, len);
+ release_sem(obj->unblock_sem);
+}
+
+OutputMediaKit::OutputMediaKit(): Output()
+{
+ m_player = NULL;
+}
+
+OutputMediaKit::~OutputMediaKit()
+{
+ uninitialize();
+}
+
+bool OutputMediaKit::initialize(quint32 freq, ChannelMap map, Qmmp::AudioFormat format)
+{
+ int buf_len = 2048 * map.count();
+
+ media_raw_audio_format mediaKitFormat = {
+ (float)freq,
+ (uint32)map.count(),
+ media_raw_audio_format::B_AUDIO_SHORT,
+ B_MEDIA_LITTLE_ENDIAN,
+ (uint32)buf_len / 2
+ };
+
+ switch (format) {
+ case Qmmp::PCM_S8:
+ mediaKitFormat.format = media_raw_audio_format::B_AUDIO_CHAR;
+ break;
+ case Qmmp::PCM_S16LE:
+ mediaKitFormat.format = media_raw_audio_format::B_AUDIO_SHORT;
+ break;
+ case Qmmp::PCM_S32LE:
+ mediaKitFormat.format = media_raw_audio_format::B_AUDIO_INT;
+ break;
+ default:
+ qWarning("Haiku MediaKit: unsupported format detected");
+ return false;
+ }
+
+ block_sem = create_sem(0, "blocker");
+ unblock_sem = create_sem(1, "unblocker");
+
+ outbuf = (char *)malloc(buf_len);
+ m_player = new BSoundPlayer(&mediaKitFormat, "Qmmp", playerProc, NULL, (void*)this);
+
+ if(m_player->InitCheck() != B_OK) {
+ delete m_player;
+ return false;
+ }
+
+ m_player->Start();
+ m_player->SetHasData(true);
+
+ Output::configure(freq, map.count(), format);
+
+ return true;
+}
+
+qint64 OutputMediaKit::latency()
+{
+ return 0;
+}
+
+qint64 OutputMediaKit::writeAudio(unsigned char *data, qint64 maxSize)
+{
+ acquire_sem(unblock_sem);
+ memcpy(outbuf, data, maxSize);
+ release_sem(block_sem);
+ return maxSize;
+}
+
+void OutputMediaKit::drain()
+{
+}
+
+void OutputMediaKit::reset()
+{
+}
+
+void OutputMediaKit::suspend()
+{
+ m_player->Stop();
+}
+
+void OutputMediaKit::resume()
+{
+ m_player->Start();
+}
+
+
+void OutputMediaKit::uninitialize()
+{
+ if(m_player) {
+ m_player->Stop();
+ delete m_player;
+ }
+ delete_sem(block_sem);
+ delete_sem(unblock_sem);
+ free(outbuf);
+}
diff --git a/src/plugins/Output/mediakit/outputmediakit.h b/src/plugins/Output/mediakit/outputmediakit.h
new file mode 100644
index 0000000..0a65f44
--- /dev/null
+++ b/src/plugins/Output/mediakit/outputmediakit.h
@@ -0,0 +1,56 @@
+/***************************************************************************
+ * Copyright (C) 2013-2015 by Gerasim Troeglazov *
+ * 3dEyes@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., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef OUTPUTMEDIAKIT_H
+#define OUTPUTMEDIAKIT_H
+
+#include <QObject>
+#include <QHash>
+#include <qmmp/output.h>
+
+#include <MediaKit.h>
+#include <SupportKit.h>
+#include <game/GameSoundDefs.h>
+#include <game/PushGameSound.h>
+
+class OutputMediaKit : public Output
+{
+public:
+ OutputMediaKit();
+ ~OutputMediaKit();
+
+ bool initialize(quint32, ChannelMap map, Qmmp::AudioFormat format);
+
+ qint64 latency();
+ qint64 writeAudio(unsigned char *data, qint64 maxSize);
+ void drain();
+ void suspend();
+ void resume();
+ void reset();
+
+ char *outbuf;
+ sem_id block_sem;
+ sem_id unblock_sem;
+private:
+ void uninitialize();
+ BSoundPlayer *m_player;
+};
+
+#endif // OUTPUTMEDIAKIT_H
diff --git a/src/plugins/Output/mediakit/outputmediakitfactory.cpp b/src/plugins/Output/mediakit/outputmediakitfactory.cpp
new file mode 100644
index 0000000..f54967e
--- /dev/null
+++ b/src/plugins/Output/mediakit/outputmediakitfactory.cpp
@@ -0,0 +1,68 @@
+/***************************************************************************
+ * Copyright (C) 2007-2012 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., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include <QTranslator>
+#include <QMessageBox>
+
+#include <qmmp/qmmp.h>
+#include "outputmediakit.h"
+#include "outputmediakitfactory.h"
+
+
+const OutputProperties OutputMediaKitFactory::properties() const
+{
+ OutputProperties properties;
+ properties.name = "MediaKit Plugin";
+ properties.hasAbout = true;
+ properties.hasSettings = false;
+ properties.shortName = "mediakit";
+ return properties;
+}
+
+Output* OutputMediaKitFactory::create()
+{
+ return new OutputMediaKit();
+}
+
+Volume *OutputMediaKitFactory::createVolume()
+{
+ return 0;
+}
+
+void OutputMediaKitFactory::showSettings(QWidget* parent)
+{
+ Q_UNUSED(parent);
+}
+
+void OutputMediaKitFactory::showAbout(QWidget *parent)
+{
+ QMessageBox::about (parent, "About MediaKit Output Plugin",
+ "Qmmp MediaKit Output Plugin\n(C) 2013-2015 3dEyes**");
+}
+
+QTranslator *OutputMediaKitFactory::createTranslator(QObject *parent)
+{
+ QTranslator *translator = new QTranslator(parent);
+ QString locale = Qmmp::systemLanguageID();
+ translator->load(QString(":/mediakit_plugin_") + locale);
+ return translator;
+}
+
+//Q_EXPORT_PLUGIN2(mediakit, OutputMediaKitFactory)
diff --git a/src/plugins/Output/mediakit/outputmediakitfactory.h b/src/plugins/Output/mediakit/outputmediakitfactory.h
new file mode 100644
index 0000000..6f3c721
--- /dev/null
+++ b/src/plugins/Output/mediakit/outputmediakitfactory.h
@@ -0,0 +1,49 @@
+/***************************************************************************
+ * Copyright (C) 2007-2012 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., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+#ifndef OUTPUTMEDIAKITFACTORY_H
+#define OUTPUTMEDIAKITFACTORY_H
+
+
+#include <QObject>
+#include <QString>
+#include <QIODevice>
+#include <QWidget>
+
+#include <qmmp/output.h>
+#include <qmmp/outputfactory.h>
+
+
+class OutputMediaKitFactory : public QObject,
+ OutputFactory
+{
+Q_OBJECT
+Q_PLUGIN_METADATA(IID "org.qmmp.qmmp.OutputFactoryInterface.1.0")
+Q_INTERFACES(OutputFactory)
+
+public:
+ const OutputProperties properties() const;
+ Output* create();
+ Volume *createVolume();
+ void showSettings(QWidget* parent);
+ void showAbout(QWidget *parent);
+ QTranslator *createTranslator(QObject *parent);
+};
+
+#endif
diff --git a/src/plugins/Output/mediakit/translations/mediakit_plugin_en.ts b/src/plugins/Output/mediakit/translations/mediakit_plugin_en.ts
new file mode 100644
index 0000000..48f6632
--- /dev/null
+++ b/src/plugins/Output/mediakit/translations/mediakit_plugin_en.ts
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.0" language="en_US">
+<context>
+ <name>OutputMediaKitFactory</name>
+</context>
+</TS>
diff --git a/src/plugins/Output/mediakit/translations/translations.qrc b/src/plugins/Output/mediakit/translations/translations.qrc
new file mode 100644
index 0000000..f678c61
--- /dev/null
+++ b/src/plugins/Output/mediakit/translations/translations.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource>
+ </qresource>
+</RCC>
--
2.15.0
From aaa5c57cb74e8a3bb3284d36e8894799eec9002e Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 22 Nov 2017 18:07:11 +1000
Subject: Disable ConfigDialog modality
diff --git a/src/qmmpui/configdialog.cpp b/src/qmmpui/configdialog.cpp
index 9aefb3a..de9c651 100644
--- a/src/qmmpui/configdialog.cpp
+++ b/src/qmmpui/configdialog.cpp
@@ -62,7 +62,9 @@ ConfigDialog::ConfigDialog (QWidget *parent) : QDialog (parent)
setAttribute(Qt::WA_QuitOnClose, false);
setAttribute(Qt::WA_DeleteOnClose, false);
#if defined(Q_OS_HAIKU)
+ hide();
setWindowModality(Qt::NonModal);
+ show();
#endif
m_ui->preferencesButton->setEnabled(false);
m_ui->informationButton->setEnabled(false);
--
2.15.0

View File

@@ -0,0 +1,106 @@
SUMMARY="Qt-based audio player with winamp/xmms skins support"
DESCRIPTION="This program is an audio-player, written with the help of the Qt library. \
The user interface is similar to winamp or xmms."
HOMEPAGE="http://qmmp.ylsoftware.com/"
COPYRIGHT="2006-2017 Qmmp Development Team"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="http://qmmp.ylsoftware.com/files/qmmp-$portVersion.tar.bz2"
CHECKSUM_SHA256="4601898490167560e189a736ae619f6161cefd12a46252a9f151ec1bf7aac6da"
ADDITIONAL_FILES="qmmp.rdef.in"
PATCHES="qmmp-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
qmmp$secondaryArchSuffix = $portVersion
app:Qmmp$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libavcodec$secondaryArchSuffix
lib:libavformat$secondaryArchSuffix
lib:libavutil$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libenca$secondaryArchSuffix
lib:libfaad$secondaryArchSuffix
lib:libflac$secondaryArchSuffix
lib:libgl$secondaryArchSuffix
lib:libglib_2.0$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libmad$secondaryArchSuffix
lib:libmms$secondaryArchSuffix
lib:libmodplug$secondaryArchSuffix
lib:libmpcdec$secondaryArchSuffix
lib:libogg$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:libsndfile$secondaryArchSuffix
lib:libtag$secondaryArchSuffix
lib:libvorbis$secondaryArchSuffix
lib:libwavpack$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libaudcore$secondaryArchSuffix
devel:libavcodec$secondaryArchSuffix
devel:libenca$secondaryArchSuffix
devel:libcurl$secondaryArchSuffix
devel:libfaad$secondaryArchSuffix
devel:libflac$secondaryArchSuffix
devel:libglib_2.0$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:libmad$secondaryArchSuffix
devel:libmms$secondaryArchSuffix
devel:libmodplug$secondaryArchSuffix
devel:libmpcdec$secondaryArchSuffix
devel:libogg$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix >= 5.7
devel:libsndfile$secondaryArchSuffix
devel:libtag$secondaryArchSuffix
devel:libvorbis$secondaryArchSuffix
devel:libwavpack$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:make
cmd:find
cmd:flex
cmd:gcc$secondaryArchSuffix
cmd:pkg_config$secondaryArchSuffix
cmd:qmake$secondaryArchSuffix >= 5.7
cmd:yacc
cmd:xargs
"
BUILD()
{
qmake
make $jobArgs
}
INSTALL()
{
mkdir -p $appsDir/Qmmp/lib
cp -rf plugins $appsDir/Qmmp/
cp -rf lib/*.so* $appsDir/Qmmp/lib
cp -f Qmmp $appsDir/Qmmp/
local APP_SIGNATURE="application/x-vnd.qt5-qmmp"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
local LONG_INFO="$SUMMARY"
sed \
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
-e "s|@LONG_INFO@|$LONG_INFO|" \
$portDir/additional-files/qmmp.rdef.in > qmmp.rdef
addResourcesToBinaries qmmp.rdef $appsDir/Qmmp/Qmmp
addAppDeskbarSymlink $appsDir/Qmmp/Qmmp
}