Hello community, here is the log from the commit of package drumstick for openSUSE:Factory checked in at 2018-12-19 13:51:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/drumstick (Old) and /work/SRC/openSUSE:Factory/.drumstick.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "drumstick" Wed Dec 19 13:51:48 2018 rev:4 rq:659346 version:1.1.2 Changes: -------- --- /work/SRC/openSUSE:Factory/drumstick/drumstick.changes 2018-05-29 10:44:09.438181104 +0200 +++ /work/SRC/openSUSE:Factory/.drumstick.new.28833/drumstick.changes 2018-12-19 13:51:58.507072112 +0100 @@ -1,0 +2,18 @@ +Tue Dec 18 15:13:00 UTC 2018 - wba...@tmo.at + +- Add Dont-use-QOverload.patch to make it build on Leap 42.3 + +------------------------------------------------------------------- +Tue Dec 18 09:49:52 UTC 2018 - wba...@tmo.at + +- Update to 1.1.2 + * Fix for ticket #13 - some macOS input events lost + * Added some bundle metadata for macOS + * Solution for ticket #8: Path for plugins hardcoded +- Add pkgconfig(libpulse-simple) BuildRequires to enable building + of libdrumstick-rt-eassynth.so (boo#1119734) +- Move rt input/output plugins to a separate + libdrumstick-rt-plugins package that's required by + libdrumstick-rt1 + +------------------------------------------------------------------- Old: ---- drumstick-1.1.1.tar.bz2 New: ---- Dont-use-QOverload.patch drumstick-1.1.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ drumstick.spec ++++++ --- /var/tmp/diff_new_pack.3e5uEz/_old 2018-12-19 13:51:59.239071099 +0100 +++ /var/tmp/diff_new_pack.3e5uEz/_new 2018-12-19 13:51:59.243071095 +0100 @@ -18,13 +18,15 @@ Name: drumstick -Version: 1.1.1 +Version: 1.1.2 Release: 0 Summary: MIDI Sequencer C++ Library Bindings License: GPL-2.0-or-later AND GPL-3.0-or-later Group: Productivity/Multimedia/Sound/Midi URL: http://drumstick.sourceforge.net/ Source: %{name}-%{version}.tar.bz2 +# PATCH-FIX-OPENSUSE +Patch: Dont-use-QOverload.patch BuildRequires: alsa-devel BuildRequires: cmake >= 2.8.11 BuildRequires: docbook-xsl-stylesheets @@ -34,6 +36,7 @@ BuildRequires: kf5-filesystem BuildRequires: libxslt BuildRequires: pkgconfig +BuildRequires: pkgconfig(libpulse-simple) BuildRequires: update-desktop-files BuildRequires: cmake(Qt5Core) BuildRequires: cmake(Qt5DBus) @@ -49,11 +52,20 @@ %package -n libdrumstick-rt1 Summary: MIDI Sequencer C++ Library Group: System/Libraries +Requires: libdrumstick-rt-plugins %description -n libdrumstick-rt1 MIDI Sequencer C++ Library Bindings for Qt5 and ALSA. This library includes a class for managing realtime MIDI input/output backends. +%package -n libdrumstick-rt-plugins +Summary: MIDI Sequencer C++ Library +Group: System/Libraries + +%description -n libdrumstick-rt-plugins +MIDI Sequencer C++ Library Bindings for Qt5 and ALSA. +This package contains input/output plugins for libdrumstick-rt1. + %package -n libdrumstick-file1 Summary: MIDI Sequencer C++ Library Group: System/Libraries @@ -99,6 +111,9 @@ %prep %setup -q +%if 0%{?suse_version} < 1500 +%patch -p1 +%endif %build %cmake_kf5 -- -DSTATIC_DRUMSTICK=0 @@ -133,13 +148,16 @@ %{_datadir}/applications/%{name}-*.desktop %{_datadir}/icons/hicolor/*/apps/%{name}.png %{_datadir}/icons/hicolor/scalable/apps/%{name}.svgz -%{_libdir}/drumstick/ %{_mandir}/man1/%{name}-*.1%{?ext_man} %files -n libdrumstick-rt1 %license COPYING %{_libdir}/libdrumstick-rt.so.* +%files -n libdrumstick-rt-plugins +%license COPYING +%{_libdir}/drumstick/ + %files -n libdrumstick-file1 %license COPYING %{_datadir}/mime/packages/%{name}.xml ++++++ Dont-use-QOverload.patch ++++++ From: Wolfgang Bauer <wba...@tmo.at> Subject: Don't use QOverload QOverload has been introduced in Qt 5.7.0. To fix the build on Leap 42.3 (which comes with Qt 5.6.2), revert this upstream change in 1.1.2. --- a/utils/vpiano/vpiano.cpp +++ b/utils/vpiano/vpiano.cpp @@ -78,14 +78,8 @@ dlgConnections.setAdvanced(m_advanced); if (m_midiIn != 0) { - //connect(m_midiIn, SIGNAL(midiNoteOn(int,int,int)), SLOT(slotNoteOn(int,int,int))); - //connect(m_midiIn, SIGNAL(midiNoteOff(int,int,int)), SLOT(slotNoteOff(int,int,int))); - connect(m_midiIn, &MIDIInput::midiNoteOn, - this, QOverload<int,int,int>::of(&VPiano::slotNoteOn), - Qt::QueuedConnection); - connect(m_midiIn, &MIDIInput::midiNoteOff, - this, QOverload<int,int,int>::of(&VPiano::slotNoteOff), - Qt::QueuedConnection); + connect(m_midiIn, SIGNAL(midiNoteOn(int,int,int)), SLOT(slotNoteOn(int,int,int))); + connect(m_midiIn, SIGNAL(midiNoteOff(int,int,int)), SLOT(slotNoteOff(int,int,int))); if (!m_lastInputConnection.isEmpty()) { m_midiIn->initialize(&settings); m_midiIn->open(m_lastInputConnection); ++++++ drumstick-1.1.1.tar.bz2 -> drumstick-1.1.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/CMakeLists.txt new/drumstick-1.1.2/CMakeLists.txt --- old/drumstick-1.1.1/CMakeLists.txt 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/CMakeLists.txt 2018-11-25 17:14:19.000000000 +0100 @@ -14,10 +14,13 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.1) if (POLICY CMP0063) cmake_policy(SET CMP0063 OLD) endif() +if (POLICY CMP0028) + cmake_policy(SET CMP0028 NEW) +endif() project(DRUMSTICK) @@ -55,7 +58,7 @@ # DRUMSTICK version string set(VERSION_MAJOR "1") set(VERSION_MINOR "1") -set(VERSION_PATCH "1") +set(VERSION_PATCH "2") set(VERSION_SUFFIX "") set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SUFFIX}) add_definitions(-DVERSION=${VERSION}) @@ -63,9 +66,9 @@ message(STATUS "drumstick ${VERSION} prefix: ${CMAKE_INSTALL_PREFIX}") set(_DBUS_INIT OFF) -if(${CMAKE_SYSTEM} MATCHES "Linux") - set(_DBUS_INIT ON) -endif() +#if(${CMAKE_SYSTEM} MATCHES "Linux") +# set(_DBUS_INIT ON) +#endif() # User options option(STATIC_DRUMSTICK "Build static libraries instead of dynamic" OFF) @@ -107,11 +110,16 @@ message(STATUS "Warning: ALSA library not found.") endif() endif() + pkg_check_modules(PULSE libpulse-simple) if(NOT PULSE_FOUND) message(STATUS "Warning: PulseAudio library not found.") endif() +if(${CMAKE_SYSTEM} MATCHES "Darwin") + find_package(Qt5Concurrent REQUIRED) +endif() + link_directories(${DRUMSTICK_BINARY_DIR}/lib) include_directories( BEFORE ${DRUMSTICK_SOURCE_DIR}/library diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/ChangeLog new/drumstick-1.1.2/ChangeLog --- old/drumstick-1.1.1/ChangeLog 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/ChangeLog 2018-11-25 17:14:19.000000000 +0100 @@ -1,3 +1,11 @@ +2018-11-25 + * release 1.1.2 + +2018-11-24 + * Fix for ticket #13 - some macOS input events lost + * Added some bundle metadata for macOS + * Solution for ticket #8: Path for plugins hardcoded + 2018-02-24 * release 1.1.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/global.pri new/drumstick-1.1.2/global.pri --- old/drumstick-1.1.1/global.pri 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/global.pri 2018-11-25 17:14:19.000000000 +0100 @@ -1,2 +1,5 @@ -VERSION = 1.1.1 +VERSION = 1.1.2 DEFINES += VERSION=$$VERSION +VER_MAJ = 1 +VER_MIN = 1 +VER_PAT = 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/library/Info.plist.lib new/drumstick-1.1.2/library/Info.plist.lib --- old/drumstick-1.1.1/library/Info.plist.lib 1970-01-01 01:00:00.000000000 +0100 +++ new/drumstick-1.1.2/library/Info.plist.lib 2018-11-25 17:14:19.000000000 +0100 @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundlePackageType</key> + <string>FMWK</string> + <key>CFBundleShortVersionString</key> + <string>@FULL_VERSION@</string> + <key>CFBundleVersion</key> + <string>@FULL_VERSION@</string> + <key>CFBundleGetInfoString</key> + <string>Created by Qt/QMake</string> + <key>CFBundleSignature</key> + <string>@TYPEINFO@</string> + <key>CFBundleExecutable</key> + <string>@LIBRARY@</string> + <key>CFBundleIdentifier</key> + <string>@BUNDLEIDENTIFIER@</string> + <key>NSHumanReadableCopyright</key> + <string>© 2006-2018, Pedro López-Cabanillas and others</string> + <key>NOTE</key> + <string>Please, do NOT change this file -- It was generated by Qt/QMake.</string> +</dict> +</plist> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/library/alsa/CMakeLists.txt new/drumstick-1.1.2/library/alsa/CMakeLists.txt --- old/drumstick-1.1.1/library/alsa/CMakeLists.txt 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/library/alsa/CMakeLists.txt 2018-11-25 17:14:18.000000000 +0100 @@ -60,9 +60,14 @@ target_link_libraries(drumstick-alsa ${ALSA_LIBS} Qt5::Core - Qt5::DBus ) +if(USE_DBUS) + target_link_libraries(drumstick-alsa + Qt5::DBus + ) +endif() + if(STATIC_DRUMSTICK) set_target_properties(drumstick-alsa PROPERTIES STATIC_LIB "libdrumstick-alsa") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/library/alsa/alsa.pro new/drumstick-1.1.2/library/alsa/alsa.pro --- old/drumstick-1.1.1/library/alsa/alsa.pro 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/library/alsa/alsa.pro 2018-11-25 17:14:18.000000000 +0100 @@ -5,9 +5,9 @@ INCLUDEPATH += . ../include include (../../global.pri) QT -= gui -QT += dbus +#QT += dbus CONFIG += qt thread create_prl -DEFINES += drumstick_alsa_EXPORTS RTKIT_SUPPORT +DEFINES += drumstick_alsa_EXPORTS #RTKIT_SUPPORT QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_HIDESYMS # Input HEADERS += ../include/alsaclient.h \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/library/file/file.pro new/drumstick-1.1.2/library/file/file.pro --- old/drumstick-1.1.1/library/file/file.pro 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/library/file/file.pro 2018-11-25 17:14:18.000000000 +0100 @@ -34,4 +34,6 @@ #QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Frameworks/ QMAKE_SONAME_PREFIX = @rpath QMAKE_TARGET_BUNDLE_PREFIX = net.sourceforge + QMAKE_BUNDLE = drumstick-file + QMAKE_INFO_PLIST = ../Info.plist.lib } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/library/library.pro new/drumstick-1.1.2/library/library.pro --- old/drumstick-1.1.1/library/library.pro 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/library/library.pro 2018-11-25 17:14:18.000000000 +0100 @@ -6,3 +6,7 @@ SUBDIRS += file SUBDIRS += rt-backends SUBDIRS += rt + +macx { + OTHER_FILES += Info.plist.lib +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/library/rt/CMakeLists.txt new/drumstick-1.1.2/library/rt/CMakeLists.txt --- old/drumstick-1.1.1/library/rt/CMakeLists.txt 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/library/rt/CMakeLists.txt 2018-11-25 17:14:18.000000000 +0100 @@ -14,6 +14,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +add_definitions(-DLIBSUFFIX=${LIB_SUFFIX}) + set(CMAKE_INCLUDE_CURRENT_DIR ON) if (APPLE) set(CMAKE_MACOSX_RPATH 1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/library/rt/backendmanager.cpp new/drumstick-1.1.2/library/rt/backendmanager.cpp --- old/drumstick-1.1.1/library/rt/backendmanager.cpp 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/library/rt/backendmanager.cpp 2018-11-25 17:14:18.000000000 +0100 @@ -59,6 +59,9 @@ Q_IMPORT_PLUGIN(OSSOutput) #endif +#define _MKSTR(x) #x +#define MKSTR(x) _MKSTR(x) + /** * @file backendmanager.cpp * Implementation of a class managing realtime MIDI input/output backends @@ -139,7 +142,10 @@ d->appendDir( appPath + QStringLiteral("../PlugIns/") + QSTR_DRUMSTICK, result ); #endif // Linux, Unix... QStringList libs; - libs << "../lib/" << "../lib32/" << "../lib64/"; + libs << "../lib/"; + #if defined(LIBSUFFIX) + libs << QString("../lib%1/").arg(MKSTR(LIBSUFFIX)); + #endif foreach(const QString& lib, libs) { d->appendDir( appPath + lib + QSTR_DRUMSTICK, result ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/library/rt/rt.pro new/drumstick-1.1.2/library/rt/rt.pro --- old/drumstick-1.1.1/library/rt/rt.pro 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/library/rt/rt.pro 2018-11-25 17:14:18.000000000 +0100 @@ -32,6 +32,8 @@ #QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Frameworks/ QMAKE_SONAME_PREFIX = @rpath QMAKE_TARGET_BUNDLE_PREFIX = net.sourceforge + QMAKE_BUNDLE = drumstick-rt + QMAKE_INFO_PLIST = ../Info.plist.lib } static { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/library/rt-backends/eassynth/src/synthcontroller.cpp new/drumstick-1.1.2/library/rt-backends/eassynth/src/synthcontroller.cpp --- old/drumstick-1.1.1/library/rt-backends/eassynth/src/synthcontroller.cpp 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/library/rt-backends/eassynth/src/synthcontroller.cpp 2018-11-25 17:14:19.000000000 +0100 @@ -32,7 +32,7 @@ SynthController::~SynthController() { - qDebug() << Q_FUNC_INFO; + //qDebug() << Q_FUNC_INFO; if (m_renderingThread.isRunning()) { stop(); } @@ -43,14 +43,14 @@ void SynthController::start() { - qDebug() << Q_FUNC_INFO; + //qDebug() << Q_FUNC_INFO; m_renderingThread.start(QThread::HighPriority); } void SynthController::stop() { - qDebug() << Q_FUNC_INFO; + //qDebug() << Q_FUNC_INFO; m_renderer->stop(); m_renderingThread.quit(); m_renderingThread.wait(); @@ -60,7 +60,7 @@ SynthController::initialize(QSettings* settings) { m_renderer->initialize(settings); - qDebug() << Q_FUNC_INFO; + //qDebug() << Q_FUNC_INFO; } QString SynthController::backendName() @@ -92,13 +92,13 @@ void SynthController::open(QString name) { Q_UNUSED(name) - qDebug() << Q_FUNC_INFO; + //qDebug() << Q_FUNC_INFO; start(); } void SynthController::close() { - qDebug() << Q_FUNC_INFO; + //qDebug() << Q_FUNC_INFO; stop(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/library/rt-backends/eassynth/src/synthrenderer.cpp new/drumstick-1.1.2/library/rt-backends/eassynth/src/synthrenderer.cpp --- old/drumstick-1.1.1/library/rt-backends/eassynth/src/synthrenderer.cpp 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/library/rt-backends/eassynth/src/synthrenderer.cpp 2018-11-25 17:14:19.000000000 +0100 @@ -78,7 +78,7 @@ m_sampleRate = easConfig->sampleRate; m_bufferSize = easConfig->mixBufferSize; m_channels = easConfig->numChannels; - qDebug() << Q_FUNC_INFO << "EAS bufferSize=" << m_bufferSize << " sampleRate=" << m_sampleRate << " channels=" << m_channels; + //qDebug() << Q_FUNC_INFO << "EAS bufferSize=" << m_bufferSize << " sampleRate=" << m_sampleRate << " channels=" << m_channels; } void @@ -113,7 +113,7 @@ { qCritical() << "Failed to create PulseAudio connection"; } - qDebug() << Q_FUNC_INFO << "period_bytes=" << period_bytes; + //qDebug() << Q_FUNC_INFO << "period_bytes=" << period_bytes; } void @@ -132,7 +132,7 @@ m_streamHandle = 0; m_easData = 0; } - qDebug() << Q_FUNC_INFO; + //qDebug() << Q_FUNC_INFO; } void @@ -142,7 +142,7 @@ pa_simple_free(m_pulseHandle); m_pulseHandle = 0; } - qDebug() << Q_FUNC_INFO; + //qDebug() << Q_FUNC_INFO; } SynthRenderer::~SynthRenderer() @@ -177,7 +177,7 @@ SynthRenderer::stop() { QWriteLocker locker(&m_mutex); - qDebug() << Q_FUNC_INFO; + //qDebug() << Q_FUNC_INFO; m_Stopped = true; } @@ -186,7 +186,7 @@ { int pa_err; unsigned char data[1024]; - qDebug() << Q_FUNC_INFO << "started"; + //qDebug() << Q_FUNC_INFO << "started"; try { initPulse(); m_Stopped = false; @@ -214,7 +214,7 @@ } catch (...) { qWarning() << "Exception in rendering loop - exiting"; } - qDebug() << Q_FUNC_INFO << "ended"; + //qDebug() << Q_FUNC_INFO << "ended"; emit finished(); } @@ -332,7 +332,7 @@ void SynthRenderer::setBufferTime(int milliseconds) { - qDebug() << Q_FUNC_INFO << milliseconds; + //qDebug() << Q_FUNC_INFO << milliseconds; m_bufferTime = milliseconds; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/library/rt-backends/mac-in/CMakeLists.txt new/drumstick-1.1.2/library/rt-backends/mac-in/CMakeLists.txt --- old/drumstick-1.1.1/library/rt-backends/mac-in/CMakeLists.txt 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/library/rt-backends/mac-in/CMakeLists.txt 2018-11-25 17:14:18.000000000 +0100 @@ -49,6 +49,7 @@ target_link_libraries(drumstick-rt-mac-in Qt5::Core + Qt5::Concurrent "-framework CoreMidi -framework CoreFoundation" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/library/rt-backends/mac-in/mac-in.pro new/drumstick-1.1.2/library/rt-backends/mac-in/mac-in.pro --- old/drumstick-1.1.1/library/rt-backends/mac-in/mac-in.pro 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/library/rt-backends/mac-in/mac-in.pro 2018-11-25 17:14:19.000000000 +0100 @@ -6,6 +6,7 @@ INCLUDEPATH += . ../../include ../common include (../../../global.pri) QT -= gui +QT += concurrent HEADERS += ../../include/rtmidiinput.h \ ../../include/rtmidioutput.h \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/library/rt-backends/mac-in/macmidiinput.cpp new/drumstick-1.1.2/library/rt-backends/mac-in/macmidiinput.cpp --- old/drumstick-1.1.1/library/rt-backends/mac-in/macmidiinput.cpp 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/library/rt-backends/mac-in/macmidiinput.cpp 2018-11-25 17:14:18.000000000 +0100 @@ -25,6 +25,7 @@ #include <QMutex> #include <QTextCodec> #include <QObject> +#include <QtConcurrent> #include <CoreFoundation/CoreFoundation.h> #include <CoreMIDI/CoreMIDI.h> @@ -54,7 +55,7 @@ MacMIDIInputPrivate(MacMIDIInput *inp) : m_inp(inp), - m_out(0), + m_out(nullptr), m_client(0), m_port(0), m_endpoint(0), @@ -69,7 +70,7 @@ void internalCreate(CFStringRef name) { OSStatus result = noErr; - result = MIDIClientCreate( name , NULL, NULL, &m_client ); + result = MIDIClientCreate( name , nullptr, nullptr, &m_client ); if (result != noErr) { qDebug() << "MIDIClientCreate() err:" << result; return; @@ -174,7 +175,7 @@ if (index < 0) return; m_source = MIDIGetSource( index ); - result = MIDIPortConnectSource( m_port, m_source, NULL ); + result = MIDIPortConnectSource( m_port, m_source, nullptr ); if (result != noErr) { qDebug() << "MIDIPortConnectSource() error:" << result; return; @@ -195,74 +196,82 @@ } } - void emitSignals(MIDIPacket* packet) + void emitSignals(QByteArray& packet) { - int value = 0; - int status = packet->data[0] & 0xf0; - int channel = packet->data[0] & 0x0f; - QByteArray data; - switch (status) { - case MIDI_STATUS_NOTEOFF: - if(m_out != 0 && m_thruEnabled) - m_out->sendNoteOff(channel, packet->data[1], packet->data[2]); - emit m_inp->midiNoteOff(channel, packet->data[1], packet->data[2]); - break; - case MIDI_STATUS_NOTEON: - if(m_out != 0 && m_thruEnabled) - m_out->sendNoteOn(channel, packet->data[1], packet->data[2]); - emit m_inp->midiNoteOn(channel, packet->data[1], packet->data[2]); - break; - case MIDI_STATUS_KEYPRESURE: - if(m_out != 0 && m_thruEnabled) - m_out->sendKeyPressure(channel, packet->data[1], packet->data[2]); - emit m_inp->midiKeyPressure(channel, packet->data[1], packet->data[2]); - break; - case MIDI_STATUS_CONTROLCHANGE: - if(m_out != 0 && m_thruEnabled) - m_out->sendController(channel, packet->data[1], packet->data[2]); - emit m_inp->midiController(channel, packet->data[1], packet->data[2]); - break; - case MIDI_STATUS_PROGRAMCHANGE: - if(m_out != 0 && m_thruEnabled) - m_out->sendProgram(channel, packet->data[1]); - emit m_inp->midiProgram(channel, packet->data[1]); - break; - case MIDI_STATUS_CHANNELPRESSURE: - if(m_out != 0 && m_thruEnabled) - m_out->sendChannelPressure(channel, packet->data[1]); - emit m_inp->midiChannelPressure(channel, packet->data[1]); - break; - case MIDI_STATUS_PITCHBEND: - value = (packet->data[1] + packet->data[2] * 0x80) - 8192; - if(m_out != 0 && m_thruEnabled) - m_out->sendPitchBend(channel, value); - emit m_inp->midiPitchBend(channel, value); - break; - case MIDI_STATUS_SYSEX: - data = QByteArray((const char *)packet->data, packet->length); - if(m_out != 0 && m_thruEnabled) - m_out->sendSysex(data); - emit m_inp->midiSysex(data); - break; - default: - qDebug() << "status?" << status; + int value = 0, j = 0; + while(j < packet.length()) { + int status = packet[j] & 0xf0; + int channel = packet[j] & 0x0f; + QByteArray data; + switch (status) { + case MIDI_STATUS_NOTEOFF: + if(m_out != nullptr && m_thruEnabled) + m_out->sendNoteOff(channel, packet[j+1], packet[j+2]); + emit m_inp->midiNoteOff(channel, packet[j+1], packet[j+2]); + j+=3; + break; + case MIDI_STATUS_NOTEON: + if(m_out != nullptr && m_thruEnabled) + m_out->sendNoteOn(channel, packet[j+1], packet[j+2]); + emit m_inp->midiNoteOn(channel, packet[j+1], packet[j+2]); + j+=3; + break; + case MIDI_STATUS_KEYPRESURE: + if(m_out != nullptr && m_thruEnabled) + m_out->sendKeyPressure(channel, packet[j+1], packet[j+2]); + emit m_inp->midiKeyPressure(channel, packet[j+1], packet[j+2]); + j+=3; + break; + case MIDI_STATUS_CONTROLCHANGE: + if(m_out != nullptr && m_thruEnabled) + m_out->sendController(channel, packet[j+1], packet[j+2]); + emit m_inp->midiController(channel, packet[j+1], packet[j+2]); + j+=3; + break; + case MIDI_STATUS_PROGRAMCHANGE: + if(m_out != nullptr && m_thruEnabled) + m_out->sendProgram(channel, packet[j+1]); + emit m_inp->midiProgram(channel, packet[j+1]); + j+=2; + break; + case MIDI_STATUS_CHANNELPRESSURE: + if(m_out != nullptr && m_thruEnabled) + m_out->sendChannelPressure(channel, packet[j+1]); + emit m_inp->midiChannelPressure(channel, packet[j+1]); + j+=2; + break; + case MIDI_STATUS_PITCHBEND: + value = (packet[j+1] + packet[j+2] * 0x80) - 8192; + if(m_out != nullptr && m_thruEnabled) + m_out->sendPitchBend(channel, value); + emit m_inp->midiPitchBend(channel, value); + j+=3; + break; + case MIDI_STATUS_SYSEX: + if(m_out != nullptr && m_thruEnabled) + m_out->sendSysex(packet); + emit m_inp->midiSysex(packet); + j+=packet.length(); + break; + default: + qDebug() << "status?" << status; + } } } - }; - void MacMIDIReadProc( const MIDIPacketList *pktlist, - void *refCon, void *connRefCon ) + void MacMIDIReadProc( const MIDIPacketList *pktlist, void *refCon, void *connRefCon ) { Q_UNUSED(connRefCon) - MacMIDIInputPrivate *obj = NULL; - if (refCon != NULL) + MacMIDIInputPrivate *obj = nullptr; + if (refCon != nullptr) obj = static_cast<MacMIDIInputPrivate*>(refCon); - - MIDIPacket *packet = (MIDIPacket *)pktlist->packet; + const MIDIPacket *packet = static_cast<const MIDIPacket *>(pktlist->packet); for (unsigned int i = 0; i < pktlist->numPackets; ++i) { - if (obj != NULL) - obj->emitSignals(packet); + if (obj != nullptr && packet != nullptr) { + QByteArray data((const char *)packet->data, packet->length); + QtConcurrent::run(obj, &MacMIDIInputPrivate::emitSignals, data); + } packet = MIDIPacketNext(packet); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/library/rt-backends/macsynth/macsynth.cpp new/drumstick-1.1.2/library/rt-backends/macsynth/macsynth.cpp --- old/drumstick-1.1.1/library/rt-backends/macsynth/macsynth.cpp 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/library/rt-backends/macsynth/macsynth.cpp 2018-11-25 17:14:18.000000000 +0100 @@ -44,13 +44,13 @@ m_graph(0), m_synthUnit(0) { - qDebug() << Q_FUNC_INFO; + //qDebug() << Q_FUNC_INFO; m_connection.clear(); } virtual ~MacSynthOutputPrivate() { - qDebug() << Q_FUNC_INFO; + //qDebug() << Q_FUNC_INFO; stop(); } @@ -106,7 +106,7 @@ AUNode outputNode = 0; AUNode limiterNode = 0; - qDebug() << Q_FUNC_INFO; + //qDebug() << Q_FUNC_INFO; if (m_graph == 0) { cd.componentManufacturer = kAudioUnitManufacturer_Apple; cd.componentFlags = 0; @@ -187,7 +187,7 @@ void stop () { OSStatus result; - qDebug() << Q_FUNC_INFO; + //qDebug() << Q_FUNC_INFO; if (m_graph != 0) { result = AUGraphStop(m_graph); if (result != noErr) @@ -205,14 +205,14 @@ void initialize ( QSettings *settings ) { - qDebug() << Q_FUNC_INFO; + //qDebug() << Q_FUNC_INFO; settings->beginGroup(PRETTY_NAME); m_default_dls = settings->value("default_dls", true).toBool(); m_reverb_dls = settings->value("reverb_dls", true).toBool(); m_soundfont_dls = settings->value("soundfont_dls").toString(); - qDebug() << "default_dls:" << m_default_dls; - qDebug() << "reverb_dls:" << m_reverb_dls; - qDebug() << "soundfont_dls" << m_soundfont_dls; + //qDebug() << "default_dls:" << m_default_dls; + //qDebug() << "reverb_dls:" << m_reverb_dls; + //qDebug() << "soundfont_dls" << m_soundfont_dls; settings->endGroup(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/utils/Info.plist.app new/drumstick-1.1.2/utils/Info.plist.app --- old/drumstick-1.1.1/utils/Info.plist.app 1970-01-01 01:00:00.000000000 +0100 +++ new/drumstick-1.1.2/utils/Info.plist.app 2018-11-25 17:14:19.000000000 +0100 @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>NSPrincipalClass</key> + <string>NSApplication</string> + <key>CFBundleIconFile</key> + <string>@ICON@</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleGetInfoString</key> + <string>Created by Qt/QMake</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleDisplayName</key> + <string>Sample Drumstick Application</string> + <key>CFBundleSignature</key> + <string>@TYPEINFO@</string> + <key>CFBundleExecutable</key> + <string>@EXECUTABLE@</string> + <key>CFBundleIdentifier</key> + <string>@BUNDLEIDENTIFIER@</string> + <key>CFBundleVersion</key> + <string>@FULL_VERSION@</string> + <key>CFBundleShortVersionString</key> + <string>@FULL_VERSION@</string> + <key>NSHumanReadableCopyright</key> + <string>© 2006-2018, Pedro López-Cabanillas and others</string> + <key>NSHighResolutionCapable</key> + <string>True</string> + <key>NOTE</key> + <string>This file was generated by Qt/QMake.</string></dict> +</plist> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/utils/drumgrid/drumgrid.pro new/drumstick-1.1.2/utils/drumgrid/drumgrid.pro --- old/drumstick-1.1.1/utils/drumgrid/drumgrid.pro 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/utils/drumgrid/drumgrid.pro 2018-11-25 17:14:19.000000000 +0100 @@ -1,6 +1,6 @@ TEMPLATE = app TARGET = drumstick-drumgrid -QT += gui widgets dbus +QT += gui widgets #dbus CONFIG += qt thread exceptions link_prl DESTDIR = ../../build/bin INCLUDEPATH += . ../../library/include ../common diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/utils/dumpmid/dumpmid.pro new/drumstick-1.1.2/utils/dumpmid/dumpmid.pro --- old/drumstick-1.1.1/utils/dumpmid/dumpmid.pro 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/utils/dumpmid/dumpmid.pro 2018-11-25 17:14:19.000000000 +0100 @@ -1,6 +1,6 @@ TEMPLATE = app TARGET = drumstick-dumpmid -QT += dbus +#QT += dbus CONFIG += qt console thread exceptions link_prl link_pkgconfig DESTDIR = ../../build/bin INCLUDEPATH += . ../../library/include ../common diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/utils/guiplayer/guiplayer.pro new/drumstick-1.1.2/utils/guiplayer/guiplayer.pro --- old/drumstick-1.1.1/utils/guiplayer/guiplayer.pro 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/utils/guiplayer/guiplayer.pro 2018-11-25 17:14:19.000000000 +0100 @@ -1,6 +1,6 @@ TEMPLATE = app TARGET = drumstick-guiplayer -QT += gui widgets dbus +QT += gui widgets #dbus CONFIG += qt thread exceptions link_prl DESTDIR = ../../build/bin INCLUDEPATH += . ../../library/include ../common diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/utils/metronome/metronome.pro new/drumstick-1.1.2/utils/metronome/metronome.pro --- old/drumstick-1.1.1/utils/metronome/metronome.pro 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/utils/metronome/metronome.pro 2018-11-25 17:14:19.000000000 +0100 @@ -1,6 +1,6 @@ TEMPLATE = app TARGET = drumstick-metronome -QT += dbus +#QT += dbus CONFIG += qt console thread exceptions link_prl DESTDIR = ../../build/bin INCLUDEPATH += . ../../library/include ../common diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/utils/playsmf/playsmf.pro new/drumstick-1.1.2/utils/playsmf/playsmf.pro --- old/drumstick-1.1.1/utils/playsmf/playsmf.pro 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/utils/playsmf/playsmf.pro 2018-11-25 17:14:19.000000000 +0100 @@ -1,6 +1,6 @@ TEMPLATE = app TARGET = drumstick-playsmf -QT += dbus +#QT += dbus CONFIG += qt console thread exceptions link_prl DESTDIR = ../../build/bin INCLUDEPATH += . ../../library/include ../common diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/utils/sysinfo/sysinfo.pro new/drumstick-1.1.2/utils/sysinfo/sysinfo.pro --- old/drumstick-1.1.1/utils/sysinfo/sysinfo.pro 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/utils/sysinfo/sysinfo.pro 2018-11-25 17:14:19.000000000 +0100 @@ -1,6 +1,6 @@ TEMPLATE = app TARGET = drumstick-sysinfo -QT += dbus +#QT += dbus CONFIG += qt console thread exceptions link_prl DESTDIR = ../../build/bin INCLUDEPATH += . ../../library/include ../common diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/utils/utils.pro new/drumstick-1.1.2/utils/utils.pro --- old/drumstick-1.1.1/utils/utils.pro 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/utils/utils.pro 2018-11-25 17:14:19.000000000 +0100 @@ -18,3 +18,6 @@ playsmf \ sysinfo } +macx { + OTHER_FILES += Info.plist.app +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/utils/vpiano/CMakeLists.txt new/drumstick-1.1.2/utils/vpiano/CMakeLists.txt --- old/drumstick-1.1.1/utils/vpiano/CMakeLists.txt 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/utils/vpiano/CMakeLists.txt 2018-11-25 17:14:19.000000000 +0100 @@ -72,6 +72,7 @@ fluidsettingsdialog.h macsynthsettingsdialog.h sonivoxsettingsdialog.h + ../../library/include/rtmidiinput.h ) qt5_wrap_cpp(vpiano_moc_SRCS ${vpiano_qtobject_SRCS}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/utils/vpiano/vpiano.cpp new/drumstick-1.1.2/utils/vpiano/vpiano.cpp --- old/drumstick-1.1.1/utils/vpiano/vpiano.cpp 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/utils/vpiano/vpiano.cpp 2018-11-25 17:14:19.000000000 +0100 @@ -78,8 +78,14 @@ dlgConnections.setAdvanced(m_advanced); if (m_midiIn != 0) { - connect(m_midiIn, SIGNAL(midiNoteOn(int,int,int)), SLOT(slotNoteOn(int,int,int))); - connect(m_midiIn, SIGNAL(midiNoteOff(int,int,int)), SLOT(slotNoteOff(int,int,int))); + //connect(m_midiIn, SIGNAL(midiNoteOn(int,int,int)), SLOT(slotNoteOn(int,int,int))); + //connect(m_midiIn, SIGNAL(midiNoteOff(int,int,int)), SLOT(slotNoteOff(int,int,int))); + connect(m_midiIn, &MIDIInput::midiNoteOn, + this, QOverload<int,int,int>::of(&VPiano::slotNoteOn), + Qt::QueuedConnection); + connect(m_midiIn, &MIDIInput::midiNoteOff, + this, QOverload<int,int,int>::of(&VPiano::slotNoteOff), + Qt::QueuedConnection); if (!m_lastInputConnection.isEmpty()) { m_midiIn->initialize(&settings); m_midiIn->open(m_lastInputConnection); @@ -101,7 +107,7 @@ //qDebug() << Q_FUNC_INFO; m_midiIn->close(); m_midiOut->close(); - qDebug() << "Cheers!"; + //qDebug() << "Cheers!"; } void VPiano::slotNoteOn(const int midiNote, const int vel) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-1.1.1/utils/vpiano/vpiano.pro new/drumstick-1.1.2/utils/vpiano/vpiano.pro --- old/drumstick-1.1.1/utils/vpiano/vpiano.pro 2018-02-24 21:04:23.000000000 +0100 +++ new/drumstick-1.1.2/utils/vpiano/vpiano.pro 2018-11-25 17:14:19.000000000 +0100 @@ -11,14 +11,15 @@ sonivoxsettingsdialog.ui \ macsynthsettingsdialog.ui HEADERS += pianokey.h pianokeybd.h pianoscene.h vpiano.h \ - keyboardmap.h keylabel.h pianodefs.h \ - connections.h vpianoabout.h preferences.h \ - fluidsettingsdialog.h networksettingsdialog.h \ + keyboardmap.h keylabel.h pianodefs.h \ + connections.h vpianoabout.h preferences.h \ + fluidsettingsdialog.h networksettingsdialog.h \ macsynthsettingsdialog.h \ - sonivoxsettingsdialog.h + sonivoxsettingsdialog.h \ + ../../library/include/rtmidiinput.h SOURCES += pianokey.cpp pianokeybd.cpp pianoscene.cpp vpiano.cpp \ - keylabel.cpp connections.cpp vpianoabout.cpp preferences.cpp vpianomain.cpp \ - fluidsettingsdialog.cpp networksettingsdialog.cpp \ + keylabel.cpp connections.cpp vpianoabout.cpp preferences.cpp vpianomain.cpp \ + fluidsettingsdialog.cpp networksettingsdialog.cpp \ macsynthsettingsdialog.cpp \ sonivoxsettingsdialog.cpp RESOURCES += pianokeybd.qrc @@ -29,6 +30,9 @@ LIBS += -framework drumstick-rt LIBS += -l$$qtLibraryTarget(drumstick-common) ICON = ../../icons/drumstick.icns + QMAKE_TARGET_BUNDLE_PREFIX = net.sourceforge + QMAKE_BUNDLE = drumstick-vpiano + QMAKE_INFO_PLIST = ../Info.plist.app } else { LIBS += -L$$OUT_PWD/../../build/lib/ LIBS += -l$$qtLibraryTarget(drumstick-common) \