Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package drumstick for openSUSE:Factory checked in at 2021-08-20 16:57:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/drumstick (Old) and /work/SRC/openSUSE:Factory/.drumstick.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "drumstick" Fri Aug 20 16:57:37 2021 rev:11 rq:912947 version:2.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/drumstick/drumstick.changes 2021-07-01 07:05:46.379412147 +0200 +++ /work/SRC/openSUSE:Factory/.drumstick.new.1899/drumstick.changes 2021-08-20 16:57:40.282892109 +0200 @@ -1,0 +2,8 @@ +Wed Aug 18 18:35:45 UTC 2021 - Christophe Giboudeaux <christo...@krop.fr> + +- Update to 2.3.1 + * updated documentation + * Fixed WRK file processing in guiplayer utility + * Fixed SMF system exclusive event write method + +------------------------------------------------------------------- Old: ---- drumstick-2.3.0.tar.bz2 New: ---- drumstick-2.3.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ drumstick.spec ++++++ --- /var/tmp/diff_new_pack.D0qckv/_old 2021-08-20 16:57:40.846891251 +0200 +++ /var/tmp/diff_new_pack.D0qckv/_new 2021-08-20 16:57:40.850891245 +0200 @@ -18,7 +18,7 @@ Name: drumstick -Version: 2.3.0 +Version: 2.3.1 Release: 0 Summary: MIDI Sequencer C++ Library Bindings License: GPL-2.0-or-later AND GPL-3.0-or-later @@ -40,7 +40,7 @@ BuildRequires: cmake(Qt5Network) BuildRequires: cmake(Qt5Test) BuildRequires: cmake(Qt5UiPlugin) -BuildRequires: cmake(Qt5Widgets) >= 5.11.0 +BuildRequires: cmake(Qt5Widgets) BuildRequires: pkgconfig(alsa) %if 0%{?suse_version} > 1500 BuildRequires: pkgconfig(fluidsynth) ++++++ drumstick-2.3.0.tar.bz2 -> drumstick-2.3.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/CMakeLists.txt new/drumstick-2.3.1/CMakeLists.txt --- old/drumstick-2.3.0/CMakeLists.txt 2021-06-28 17:28:22.438420125 +0200 +++ new/drumstick-2.3.1/CMakeLists.txt 2021-07-29 16:01:55.324924475 +0200 @@ -18,7 +18,7 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment version") project( Drumstick - VERSION 2.3.0 + VERSION 2.3.1 LANGUAGES C CXX DESCRIPTION "MIDI C++ Libraries for Qt" HOMEPAGE_URL "https://sourceforge.net/p/drumstick/" @@ -59,17 +59,28 @@ add_definitions(-DREVISION=${PROJECT_WC_REVISION}) endif() +if (UNIX) + set(_DOCS_INIT ON) +else() + set(_DOCS_INIT OFF) +endif() + set(_DBUS_INIT OFF) if (UNIX AND NOT APPLE) - set(_DOCS_INIT ON) set(_PULSE_INIT ON) else () - set(_DOCS_INIT OFF) set(_PULSE_INIT OFF) endif () +if (APPLE) + set(_FRAMEWORKS_INIT ON) +else() + set(_FRAMEWORKS_INIT OFF) +endif() + option(BUILD_DOCS "Build Doxygen documentation and man pages" ${_DOCS_INIT}) option(BUILD_UTILS "Build Utilities and Examples" ON) +option(BUILD_FRAMEWORKS "Build macOS style frameworks" ${_FRAMEWORKS_INIT}) option(STATIC_DRUMSTICK "Build static libraries instead of dynamic" OFF) option(USE_DBUS "Include DBus support (required for RealtimeKit)" ${_DBUS_INIT}) option(USE_PULSEAUDIO "Build Sonivox RT backend (if PulseAudio is available)" ${_PULSE_INIT}) @@ -82,7 +93,15 @@ message(STATUS "Building static libraries") else() set(BUILD_SHARED_LIBS ON) - message(STATUS "Building dynamic libraries") + if (BUILD_FRAMEWORKS) + message(STATUS "Building macOS style frameworks") + else() + message(STATUS "Building unix dynamic libraries") + endif() +endif() + +if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.15) + set(CMAKE_FRAMEWORK ${BUILD_FRAMEWORKS}) endif() find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED) @@ -156,6 +175,7 @@ message (STATUS "${PROJECT_NAME} v${PROJECT_VERSION} Install prefix: ${CMAKE_INSTALL_PREFIX} Build configuration: ${CMAKE_BUILD_TYPE} + System: ${CMAKE_SYSTEM_NAME} Processor: ${CMAKE_SYSTEM_PROCESSOR} Qt Version: ${QT_VERSION} D-Bus support: ${USE_DBUS} @@ -164,7 +184,8 @@ FluidSynth support: ${USE_FLUIDSYNTH} Building tests: ${BUILD_TESTING} Building docs: ${BUILD_DOCS} - Building utils: ${BUILD_UTILS}" + Building utils: ${BUILD_UTILS} + Building frameworks: ${BUILD_FRAMEWORKS}" ) add_subdirectory(library) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/ChangeLog new/drumstick-2.3.1/ChangeLog --- old/drumstick-2.3.0/ChangeLog 2021-06-28 17:28:22.438420125 +0200 +++ new/drumstick-2.3.1/ChangeLog 2021-07-29 16:01:55.324924475 +0200 @@ -1,3 +1,18 @@ +2021-07-29 + * Release 2.3.1 + +2021-07-28 + * New option: BUILD_FRAMEWORKS for macOS style frameworks + instead of plain Unix libraries + +2021-07-22 + * Fixed SMF system exclusive event write method + +2021-07-14 + * Fixed WRK file processing in guiplayer utility + * updated documentation + * bumped version to 2.3.1 for the next development cycle + 2021-06-29 * Release 2.3.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/cmake_admin/CustomFrameworkInfo.plist.in new/drumstick-2.3.1/cmake_admin/CustomFrameworkInfo.plist.in --- old/drumstick-2.3.0/cmake_admin/CustomFrameworkInfo.plist.in 1970-01-01 01:00:00.000000000 +0100 +++ new/drumstick-2.3.1/cmake_admin/CustomFrameworkInfo.plist.in 2021-07-29 16:01:55.232924251 +0200 @@ -0,0 +1,20 @@ +<?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>${PROJECT_VERSION}</string> + <key>CFBundleVersion</key> + <string>${PROJECT_VERSION}</string> + <key>CFBundleGetInfoString</key> + <string>Created by CMake</string> + <key>CFBundleIdentifier</key> + <string>${MACOSX_FRAMEWORK_IDENTIFIER}</string> + <key>NSHumanReadableCopyright</key> + <string>?? 2006-2021, Pedro L??pez-Cabanillas and others</string> + <key>NOTE</key> + <string>Please, do NOT change this file -- It was generated by CMake.</string> +</dict> +</plist> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/cmake_admin/MacOSXFrameworkInfo.plist.in new/drumstick-2.3.1/cmake_admin/MacOSXFrameworkInfo.plist.in --- old/drumstick-2.3.0/cmake_admin/MacOSXFrameworkInfo.plist.in 2021-06-28 17:28:22.366419963 +0200 +++ new/drumstick-2.3.1/cmake_admin/MacOSXFrameworkInfo.plist.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,20 +0,0 @@ -<?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>${PROJECT_VERSION}</string> - <key>CFBundleVersion</key> - <string>${PROJECT_VERSION}</string> - <key>CFBundleGetInfoString</key> - <string>Created by CMake</string> - <key>CFBundleIdentifier</key> - <string>${MACOSX_FRAMEWORK_IDENTIFIER}</string> - <key>NSHumanReadableCopyright</key> - <string>?? 2006-2019, Pedro L??pez-Cabanillas and others</string> - <key>NOTE</key> - <string>Please, do NOT change this file -- It was generated by CMake.</string> -</dict> -</plist> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/doc/CMakeLists.txt new/drumstick-2.3.1/doc/CMakeLists.txt --- old/drumstick-2.3.0/doc/CMakeLists.txt 2021-06-28 17:28:22.426420097 +0200 +++ new/drumstick-2.3.1/doc/CMakeLists.txt 2021-07-29 16:01:55.312924446 +0200 @@ -23,7 +23,7 @@ # OUTPUT_VARIABLE RELEASE_DATE # OUTPUT_STRIP_TRAILING_WHITESPACE #) - set(RELEASE_DATE "June 29, 2021") + set(RELEASE_DATE "July 29, 2021") configure_file(drumstick-devel.doc.txt.in ${CMAKE_CURRENT_BINARY_DIR}/drumstick-devel.doc.txt IMMEDIATE @ONLY) configure_file(drumstick-drumgrid.xml.in diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/doc/drumstick-devel.doc.txt.in new/drumstick-2.3.1/doc/drumstick-devel.doc.txt.in --- old/drumstick-2.3.0/doc/drumstick-devel.doc.txt.in 2021-06-28 17:28:22.426420097 +0200 +++ new/drumstick-2.3.1/doc/drumstick-devel.doc.txt.in 2021-07-29 16:01:55.312924446 +0200 @@ -242,10 +242,11 @@ There are more examples in the source tree, under the utils/ directory, and you can also see applications using this library, like kmetronome, kmidimon and VMPK. +@see https://dmidiplayer.sourceforge.io @see https://kmetronome.sourceforge.io @see https://kmidimon.sourceforge.io -@see https://kmid2.sourceforge.io @see https://vmpk.sourceforge.io +@see https://wrk2mid.sourceforge.io @section Acknowledgments Parts of this documentation are copied from the ALSA library documentation, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/global.pri new/drumstick-2.3.1/global.pri --- old/drumstick-2.3.0/global.pri 2021-06-28 17:28:22.442420134 +0200 +++ new/drumstick-2.3.1/global.pri 2021-07-29 16:01:55.324924475 +0200 @@ -1,8 +1,8 @@ -VERSION = 2.3.0 +VERSION = 2.3.1 DEFINES += VERSION=$$VERSION VER_MAJ = 2 VER_MIN = 3 -VER_PAT = 0 +VER_PAT = 1 defineReplace(drumstickLib) { LIBRARY_NAME = $$1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/install.md new/drumstick-2.3.1/install.md --- old/drumstick-2.3.0/install.md 2021-06-28 17:28:22.438420125 +0200 +++ new/drumstick-2.3.1/install.md 2021-07-29 16:01:55.324924475 +0200 @@ -103,6 +103,12 @@ -DBUILD_TESTING=NO|OFF|0 Don't build unit tests +-DBUILD_FRAMEWORKS=YES|ON|1 +Build macOS style frameworks (default) + +-DBUILD_FRAMEWORKS=NO|OFF|0 +Don't build macOS style frameworks, build Unix style dynamic libraries (.dylib) + -DUSE_NETWORK=YES|ON|1 Build the ipMIDI Network RT backend (default) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/library/file/CMakeLists.txt new/drumstick-2.3.1/library/file/CMakeLists.txt --- old/drumstick-2.3.0/library/file/CMakeLists.txt 2021-06-28 17:28:22.398420035 +0200 +++ new/drumstick-2.3.1/library/file/CMakeLists.txt 2021-07-29 16:01:55.272924348 +0200 @@ -15,12 +15,6 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. set(CMAKE_INCLUDE_CURRENT_DIR ON) -#if (APPLE) -# set(CMAKE_MACOSX_RPATH 1) -# set(MACOSX_FRAMEWORK_IDENTIFIER ???net.sourceforge???) -# set(MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) -# set(MACOSX_FRAMEWORK_BUNDLE_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) -#endif() if (QT_VERSION VERSION_GREATER_EQUAL 6.0) find_package(Qt6 COMPONENTS Core5Compat REQUIRED) @@ -37,10 +31,10 @@ ../include/drumstick/qwrk.h ) -if(APPLE) +if(BUILD_FRAMEWORKS) set_source_files_properties(${drumstick-file_HEADERS} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/drumstick -) + ) endif() set(drumstick-file_SRCS @@ -83,14 +77,19 @@ STATIC_LIB "libdrumstick-file") else() set_target_properties(drumstick-file PROPERTIES - FRAMEWORK TRUE VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} SOVERSION ${PROJECT_VERSION_MAJOR} - FRAMEWORK_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} - MACOSX_FRAMEWORK_IDENTIFIER "net.sourceforge.drumstick-file" MACOSX_RPATH TRUE EXPORT_NAME File ) + if(BUILD_FRAMEWORKS) + set_target_properties(drumstick-file PROPERTIES + FRAMEWORK ${BUILD_FRAMEWORKS} + FRAMEWORK_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} + MACOSX_FRAMEWORK_IDENTIFIER "net.sourceforge.drumstick-file" + MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/cmake_admin/CustomFrameworkInfo.plist.in" + ) + endif() endif() install(TARGETS drumstick-file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/library/file/qsmf.cpp new/drumstick-2.3.1/library/file/qsmf.cpp --- old/drumstick-2.3.0/library/file/qsmf.cpp 2021-06-28 17:28:22.398420035 +0200 +++ new/drumstick-2.3.1/library/file/qsmf.cpp 2021-07-29 16:01:55.272924348 +0200 @@ -593,9 +593,9 @@ void QSmf::writeMidiEvent(long deltaTime, int type, int chan, const QByteArray& data) { - int i, j, size; + unsigned int i, j, size; quint8 c; - writeVarLen(deltaTime); + writeVarLen(quint64(deltaTime)); if ((type == system_exclusive) || (type == end_of_sysex)) { c = type; @@ -614,17 +614,18 @@ d->m_LastStatus = c; putByte(c); } + c = quint8(data[0]); if (type == system_exclusive || type == end_of_sysex) { size = data.size(); - if (data[0] == type) + if (type == c) --size; writeVarLen(size); } - j = (data[0] == type ? 1 : 0); - for (i = j; i < data.size(); ++i) + j = (c == type ? 1 : 0); + for (i = j; i < unsigned(data.size()); ++i) { - putByte(data[i]); + putByte(quint8(data[i])); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/library/include/drumstick/qsmf.h new/drumstick-2.3.1/library/include/drumstick/qsmf.h --- old/drumstick-2.3.0/library/include/drumstick/qsmf.h 2021-06-28 17:28:22.398420035 +0200 +++ new/drumstick-2.3.1/library/include/drumstick/qsmf.h 2021-07-29 16:01:55.272924348 +0200 @@ -275,8 +275,14 @@ */ void signalSMFTrackEnd(); /** - * Emitted to request the user to write the tempo track. - * This is the first track in a format 1 SMF. + * Emitted to request the user to prepare the tempo track. + * + * The signal handler should not call the writeTempo() or writeBpmTempo() + * methods directly, but instead it should fill the Conductor track with + * tempo and other SMF meta events like key and time signatures to be written + * later, at the signalSMFWriteTrack() handler. + * + * The Conductor track is the first track in a format 1 SMF. */ void signalSMFWriteTempoTrack(); /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/library/rt/CMakeLists.txt new/drumstick-2.3.1/library/rt/CMakeLists.txt --- old/drumstick-2.3.0/library/rt/CMakeLists.txt 2021-06-28 17:28:22.394420026 +0200 +++ new/drumstick-2.3.1/library/rt/CMakeLists.txt 2021-07-29 16:01:55.268924339 +0200 @@ -28,7 +28,7 @@ ../include/drumstick/backendmanager.h ) -if(APPLE) +if(BUILD_FRAMEWORKS) set_source_files_properties(${drumstick-rt_HEADERS} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/drumstick ) @@ -74,11 +74,16 @@ SOVERSION ${PROJECT_VERSION_MAJOR} EXPORT_NAME RT # macOS: - FRAMEWORK TRUE - FRAMEWORK_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} - MACOSX_FRAMEWORK_IDENTIFIER "net.sourceforge.drumstick-rt" MACOSX_RPATH TRUE ) + if (BUILD_FRAMEWORKS) + set_target_properties(drumstick-rt PROPERTIES + FRAMEWORK ${BUILD_FRAMEWORKS} + FRAMEWORK_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} + MACOSX_FRAMEWORK_IDENTIFIER "net.sourceforge.drumstick-rt" + MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/cmake_admin/CustomFrameworkInfo.plist.in" + ) + endif() endif() # STATIC_DRUMSTICK install(TARGETS drumstick-rt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/library/rt/backendmanager.cpp new/drumstick-2.3.1/library/rt/backendmanager.cpp --- old/drumstick-2.3.0/library/rt/backendmanager.cpp 2021-06-28 17:28:22.394420026 +0200 +++ new/drumstick-2.3.1/library/rt/backendmanager.cpp 2021-07-29 16:01:55.268924339 +0200 @@ -133,7 +133,11 @@ d->appendDir(QString(envdir), result ); } d->appendDir( QDir::homePath() + QDir::separator() + QSTR_DRUMSTICK, result ); +#if QT_VERSION < QT_VERSION_CHECK(6,0,0) d->appendDir( QLibraryInfo::location(QLibraryInfo::PluginsPath) + QDir::separator() + QSTR_DRUMSTICK, result ); +#else + d->appendDir( QLibraryInfo::path(QLibraryInfo::PluginsPath) + QDir::separator() + QSTR_DRUMSTICK, result ); +#endif foreach(const QString& path, QCoreApplication::libraryPaths()) { d->appendDir( path + QDir::separator() + QSTR_DRUMSTICK, result ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/library/rt-backends/win-in/winmidiinput.cpp new/drumstick-2.3.1/library/rt-backends/win-in/winmidiinput.cpp --- old/drumstick-2.3.0/library/rt-backends/win-in/winmidiinput.cpp 2021-06-28 17:28:22.394420026 +0200 +++ new/drumstick-2.3.1/library/rt-backends/win-in/winmidiinput.cpp 2021-07-29 16:01:55.268924339 +0200 @@ -207,7 +207,7 @@ #ifdef UNICODE WCHAR buffer[1024]; midiInGetErrorText(err, &buffer[0], sizeof(buffer)); - errstr = QString::fromUtf16((const ushort*)buffer); + errstr = QString::fromWCharArray(buffer); #else char buffer[1024]; midiOutGetErrorText(err, &buffer[0], sizeof(buffer)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/library/rt-backends/win-out/winmidioutput.cpp new/drumstick-2.3.1/library/rt-backends/win-out/winmidioutput.cpp --- old/drumstick-2.3.0/library/rt-backends/win-out/winmidioutput.cpp 2021-06-28 17:28:22.394420026 +0200 +++ new/drumstick-2.3.1/library/rt-backends/win-out/winmidioutput.cpp 2021-07-29 16:01:55.268924339 +0200 @@ -199,7 +199,7 @@ #ifdef UNICODE WCHAR buffer[1024]; midiOutGetErrorText(err, &buffer[0], sizeof(buffer)); - errstr = QString::fromUtf16((const ushort*)buffer); + errstr = QString::fromWCharArray(buffer); #else char buffer[1024]; midiOutGetErrorText(err, &buffer[0], sizeof(buffer)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/library/widgets/CMakeLists.txt new/drumstick-2.3.1/library/widgets/CMakeLists.txt --- old/drumstick-2.3.0/library/widgets/CMakeLists.txt 2021-06-28 17:28:22.398420035 +0200 +++ new/drumstick-2.3.1/library/widgets/CMakeLists.txt 2021-07-29 16:01:55.276924358 +0200 @@ -39,7 +39,7 @@ sonivoxsettingsdialog.h ) -if(APPLE) +if(BUILD_FRAMEWORKS) set_source_files_properties(${drumstick-widgets_HEADERS} PROPERTIES MACOSX_PACKAGE_LOCATION Headers/drumstick ) @@ -141,11 +141,16 @@ SOVERSION ${PROJECT_VERSION_MAJOR} EXPORT_NAME Widgets # macOS: - FRAMEWORK TRUE - FRAMEWORK_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} - MACOSX_FRAMEWORK_IDENTIFIER "net.sourceforge.drumstick-widgets" MACOSX_RPATH TRUE ) + if (BUILD_FRAMEWORKS) + set_target_properties(drumstick-widgets PROPERTIES + FRAMEWORK ${BUILD_FRAMEWORKS} + FRAMEWORK_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} + MACOSX_FRAMEWORK_IDENTIFIER "net.sourceforge.drumstick-widgets" + MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR}/cmake_admin/CustomFrameworkInfo.plist.in" + ) + endif() endif() # STATIC_DRUMSTICK install(TARGETS drumstick-widgets diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/library/widgets/pianokeybd.cpp new/drumstick-2.3.1/library/widgets/pianokeybd.cpp --- old/drumstick-2.3.0/library/widgets/pianokeybd.cpp 2021-06-28 17:28:22.398420035 +0200 +++ new/drumstick-2.3.1/library/widgets/pianokeybd.cpp 2021-07-29 16:01:55.276924358 +0200 @@ -429,7 +429,7 @@ setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setViewportUpdateMode(MinimalViewportUpdate); setRenderHints(QPainter::Antialiasing|QPainter::TextAntialiasing|QPainter::SmoothPixmapTransform); -#if (QT_VERSION < QT_VERSION_CHECK(6,0,0)) +#if (QT_VERSION < QT_VERSION_CHECK(5,15,0)) setOptimizationFlag(DontClipPainter, true); #endif setOptimizationFlag(DontSavePainterState, true); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/utils/guiplayer/guiplayer.cpp new/drumstick-2.3.1/utils/guiplayer/guiplayer.cpp --- old/drumstick-2.3.0/utils/guiplayer/guiplayer.cpp 2021-06-28 17:28:22.418420080 +0200 +++ new/drumstick-2.3.1/utils/guiplayer/guiplayer.cpp 2021-07-29 16:01:55.308924436 +0200 @@ -31,6 +31,7 @@ #include <QTextCodec> #include <QToolTip> #include <QUrl> +#include <QTextCodec> #include <qmath.h> #include "guiplayer.h" @@ -137,6 +138,7 @@ connect(m_smf, &QSmf::signalSMFError, this, &GUIPlayer::smfErrorHandler); m_wrk = new QWrk(this); + m_wrk->setTextCodec(QTextCodec::codecForLocale()); connect(m_wrk, &QWrk::signalWRKError, this, &GUIPlayer::wrkErrorHandler); connect(m_wrk, &QWrk::signalWRKUnknownChunk, this, &GUIPlayer::wrkUpdateLoadProgress); connect(m_wrk, &QWrk::signalWRKHeader, this, &GUIPlayer::wrkFileHeader); @@ -182,6 +184,7 @@ GUIPlayer::~GUIPlayer() { m_Client->stopSequencerInput(); + m_Port->unsubscribeAll(); m_Port->detach(); m_Client->close(); delete m_player; @@ -675,8 +678,9 @@ void GUIPlayer::wrkUpdateLoadProgress() { - if (m_pd != nullptr) + if (m_pd != nullptr) { progressDialogUpdate(m_wrk->getFilePos()); + } } void @@ -695,21 +699,24 @@ void GUIPlayer::wrkErrorHandler(const QString& errorStr) { - if (m_loadingMessages.length() < 1024) + if (m_loadingMessages.length() < 1024) { m_loadingMessages.append(QString("%1 at file offset %2<br>") .arg(errorStr).arg(m_wrk->getFilePos())); + } } void GUIPlayer::wrkFileHeader(int /*verh*/, int /*verl*/) { m_song->setHeader(1, 0, 120); wrkUpdateLoadProgress(); +// qDebug() << Q_FUNC_INFO; } void GUIPlayer::wrkTimeBase(int timebase) { m_song->setDivision(timebase); wrkUpdateLoadProgress(); +// qDebug() << Q_FUNC_INFO << timebase; } void GUIPlayer::wrkStreamEndEvent(long time) @@ -718,6 +725,7 @@ if (ticks > m_tick) m_tick = ticks; wrkUpdateLoadProgress(); +// qDebug() << Q_FUNC_INFO << time; } void GUIPlayer::wrkTrackHeader( const QString& /*name1*/, @@ -732,93 +740,88 @@ rec.velocity = velocity; m_trackMap[trackno] = rec; wrkUpdateLoadProgress(); +// qDebug() << Q_FUNC_INFO << trackno << channel << pitch << velocity; } void GUIPlayer::wrkNoteEvent(int track, long time, int chan, int pitch, int vol, int dur) { - int channel = chan; TrackMapRec rec = m_trackMap[track]; - int key = pitch + rec.pitch; - int velocity = vol + rec.velocity; - if (rec.channel > -1) - channel = rec.channel; + int channel = (rec.channel > -1) ? rec.channel : chan; + int key = qBound(0, pitch + rec.pitch, 127); + int velocity = qBound(0, vol + rec.velocity, 127); SequencerEvent* ev = new NoteEvent(channel, key, velocity, dur); appendWRKEvent(time, ev); +// qDebug() << Q_FUNC_INFO << channel << key << velocity << dur; } void GUIPlayer::wrkKeyPressEvent(int track, long time, int chan, int pitch, int press) { - int channel = chan; TrackMapRec rec = m_trackMap[track]; int key = pitch + rec.pitch; - if (rec.channel > -1) - channel = rec.channel; + int channel = (rec.channel > -1) ? rec.channel : chan; SequencerEvent* ev = new KeyPressEvent(channel, key, press); appendWRKEvent(time, ev); +// qDebug() << Q_FUNC_INFO; } void GUIPlayer::wrkCtlChangeEvent(int track, long time, int chan, int ctl, int value) { - int channel = chan; TrackMapRec rec = m_trackMap[track]; - if (rec.channel > -1) - channel = rec.channel; + int channel = (rec.channel > -1) ? rec.channel : chan; SequencerEvent* ev = new ControllerEvent(channel, ctl, value); appendWRKEvent(time, ev); +// qDebug() << Q_FUNC_INFO; } void GUIPlayer::wrkPitchBendEvent(int track, long time, int chan, int value) { - int channel = chan; TrackMapRec rec = m_trackMap[track]; - if (rec.channel > -1) - channel = rec.channel; + int channel = (rec.channel > -1) ? rec.channel : chan; SequencerEvent* ev = new PitchBendEvent(channel, value); appendWRKEvent(time, ev); +// qDebug() << Q_FUNC_INFO; } void GUIPlayer::wrkProgramEvent(int track, long time, int chan, int patch) { - int channel = chan; TrackMapRec rec = m_trackMap[track]; - if (rec.channel > -1) - channel = rec.channel; + int channel = (rec.channel > -1) ? rec.channel : chan; SequencerEvent* ev = new ProgramChangeEvent(channel, patch); appendWRKEvent(time, ev); +// qDebug() << Q_FUNC_INFO; } void GUIPlayer::wrkChanPressEvent(int track, long time, int chan, int press) { - int channel = chan; TrackMapRec rec = m_trackMap[track]; - if (rec.channel > -1) - channel = rec.channel; + int channel = (rec.channel > -1) ? rec.channel : chan; SequencerEvent* ev = new ChanPressEvent(channel, press); appendWRKEvent(time, ev); +// qDebug() << Q_FUNC_INFO; } void GUIPlayer::wrkSysexEvent(int track, long time, int bank) { - SysexEventRec rec; - rec.track = track; - rec.time = time; - rec.bank = bank; - m_savedSysexEvents.append(rec); - wrkUpdateLoadProgress(); + Q_UNUSED(track) + qDebug() << Q_FUNC_INFO; + if (m_savedSysexEvents.contains(bank)) { + SysExEvent* ev = m_savedSysexEvents[bank].clone(); + appendWRKEvent(time, ev); + wrkUpdateLoadProgress(); + } } void GUIPlayer::wrkSysexEventBank(int bank, const QString& /*name*/, bool autosend, int /*port*/, const QByteArray& data) { + //qDebug() << Q_FUNC_INFO; SysExEvent* ev = new SysExEvent(data); - if (autosend) - appendWRKEvent(0, ev->clone()); - foreach(const SysexEventRec& rec, m_savedSysexEvents) { - if (rec.bank == bank) { - appendWRKEvent(rec.time, ev->clone()); - } + if (autosend) { + appendWRKEvent(0, ev); + } else { + m_savedSysexEvents[bank] = *ev; + delete ev; } - delete ev; wrkUpdateLoadProgress(); } @@ -829,15 +832,15 @@ m_initialTempo = qRound( bpm ); SequencerEvent* ev = new TempoEvent(m_queueId, qRound ( 6e7 / bpm ) ); appendWRKEvent(time, ev); +// qDebug() << Q_FUNC_INFO; } void GUIPlayer::wrkTrackPatch(int track, int patch) { - int channel = 0; TrackMapRec rec = m_trackMap[track]; - if (rec.channel > -1) - channel = rec.channel; + int channel = (rec.channel > -1) ? rec.channel : 0; wrkProgramEvent(track, 0, channel, patch); +// qDebug() << Q_FUNC_INFO; } void GUIPlayer::wrkNewTrackHeader( const QString& /*name*/, @@ -851,15 +854,14 @@ rec.velocity = velocity; m_trackMap[trackno] = rec; wrkUpdateLoadProgress(); +// qDebug() << Q_FUNC_INFO << trackno << channel << pitch << velocity; } void GUIPlayer::wrkTrackVol(int track, int vol) { - int channel = 0; int lsb, msb; TrackMapRec rec = m_trackMap[track]; - if (rec.channel > -1) - channel = rec.channel; + int channel = (rec.channel > -1) ? rec.channel : 0; if (vol < 128) wrkCtlChangeEvent(track, 0, channel, MIDI_CTL_MSB_MAIN_VOLUME, vol); else { @@ -868,20 +870,20 @@ wrkCtlChangeEvent(track, 0, channel, MIDI_CTL_LSB_MAIN_VOLUME, lsb); wrkCtlChangeEvent(track, 0, channel, MIDI_CTL_MSB_MAIN_VOLUME, msb); } +// qDebug() << Q_FUNC_INFO; } void GUIPlayer::wrkTrackBank(int track, int bank) { // assume GM/GS bank method - int channel = 0; int lsb, msb; TrackMapRec rec = m_trackMap[track]; - if (rec.channel > -1) - channel = rec.channel; + int channel = (rec.channel > -1) ? rec.channel : 0; lsb = bank % 0x80; msb = bank / 0x80; wrkCtlChangeEvent(track, 0, channel, MIDI_CTL_MSB_BANK, msb); wrkCtlChangeEvent(track, 0, channel, MIDI_CTL_LSB_BANK, lsb); +// qDebug() << Q_FUNC_INFO; } void GUIPlayer::wrkEndOfFile() @@ -890,4 +892,5 @@ m_initialTempo = 120; SequencerEvent* ev = new SystemEvent(SND_SEQ_EVENT_ECHO); appendWRKEvent(m_tick, ev); +// qDebug() << Q_FUNC_INFO; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drumstick-2.3.0/utils/guiplayer/guiplayer.h new/drumstick-2.3.1/utils/guiplayer/guiplayer.h --- old/drumstick-2.3.0/utils/guiplayer/guiplayer.h 2021-06-28 17:28:22.418420080 +0200 +++ new/drumstick-2.3.1/utils/guiplayer/guiplayer.h 2021-07-29 16:01:55.308924436 +0200 @@ -33,6 +33,7 @@ class MidiPort; class MidiQueue; class SequencerEvent; + class SysExEvent; } namespace File { class QSmf; @@ -168,12 +169,7 @@ QString m_lastDirectory; QString m_loadingMessages; - struct SysexEventRec { - int track; - long time; - int bank; - }; - QList<SysexEventRec> m_savedSysexEvents; + QHash<int, drumstick::ALSA::SysExEvent> m_savedSysexEvents; struct TrackMapRec { int channel;