diff --git a/media-sound/mixxx/Manifest b/media-sound/mixxx/Manifest index b485f93..1b88876 100644 --- a/media-sound/mixxx/Manifest +++ b/media-sound/mixxx/Manifest @@ -5,6 +5,7 @@ AUX mixxx-2.1.0-denon-mc6000mk2-use-ramping-for-back-spins.patch 64070 BLAKE2B f AUX mixxx-2.1.0-fidlib-thread-safe-and-reentrant-generation-of-filters.patch 35122 BLAKE2B 976c623afc6f62fb5ee5082bcc503b7ca4bf5af160e102257024874e750a681347d6e4b70328a6596c88b261ed02f66ccb7c5897d1cf8174a92e4bb50d1e55c9 SHA512 377e2cd176264849f7de28d48107dca1c41b18a02c610d4f8c1ac824dc6e4c3d8b18363a7a3ae0d585157fed33592ad6cf578148508416b0783bd6b4084aaeb1 AUX mixxx-2.1.0-fix-clearing-of-replaygain-gain-ratio-in-file-tags.patch 6898 BLAKE2B 7e20e44b0d6646cf410473b3d4c1ca310aa1b9ec8fafb06ee4480a90be7cb6fd3b67ac1a425d98beed03eef22016ad76f127ddcb46c6a7a22237ca93b59826ab SHA512 ecffb8bab5ad1d1f55acc2c3187a4dd10edda22e6708754e76184181808afc3fb014d43544b0a1006c9a439673bb56ab54549a0d95c0a05e709dcaba3600f8cc AUX mixxx-2.1.0-fix-crash-when-removing-a-quick-link.patch 3143 BLAKE2B e0562c35c83fcefe50362a5f2359cbca10853a0a4c2285866a5bd48a8ff7d13de066c2a153e86dd657c18fe1a30610f55f8e2ec95a958c9d0cc3a6288064f572 SHA512 94ba8e2e94f6f5ed8152f9499b5334211e812e374a5fafd48b8dc21e9e0b0ae8d6919f6a59fb3bae6c1d86de820ad654be45b0813f896cf4819dfaf2bebedc2d +AUX mixxx-2.1.0-fix-decoding-of-improperly-encoded-flac-files.patch 8256 BLAKE2B 5fd8a4ddb15449477212f077b7b176ffe30adfbb5521eece8e9fa5e7af17a2247f3f9936841ebfcf271664e1cf8928f71426019e5b8e02ae4972193c4351de21 SHA512 0c44bbd9d8d67b843420de6cafeb3e10f2ed31ff8af424d5e9d219d41f3e465ddee40141530fcba000cb99e4a136850c418dcae5bd73047328c7436635d85071 AUX mixxx-2.1.0-fix-flac-decoding-and-upgrade-db-schema.patch 15891 BLAKE2B fd032363b07357c1fa16c2376b5f2f5b9580cb9c4534238336fca014f5432e460ba081c20608f22055c4e0799c17fba0f96b7d65a131d193d398ee5ffdda8e95 SHA512 99d3feb6761b8bd58acd7e1e4a8f0d2660b1bc1fb7f1885fb0211ad09dec3b1ab77c4ff0b8054e04313170bc050b0e655e8c90aa3d8301c39189ca6c2e2e4bdd AUX mixxx-2.1.0-fix-integration-of-external-track-libraries.patch 16616 BLAKE2B 018fa65eae522ae9fe1d42816614353e7c31c30cfa8685257f72296c115fb5f0e3bab9482ada681200dfacf15c80599f6ecb46868849c1fc412abab2c51a56c6 SHA512 6355e065e29fe433580d685275667681c3c5f10b7153dc4d798db4265593fbf07118ff2e6e6f819919fab11cbb873615ca199289e5a311bd4e4fd9883d5cf66d AUX mixxx-2.1.0-fix-invocation-args-of-pasuspender.patch 1879 BLAKE2B cc24dcfc530a85c673a26a4794e64d6c71d89785f8550b0d9162aa714221af6a1ceabcbb65340f3c48fb79e6b145f98ef2ef0608f66b75fd06683b3cb8062126 SHA512 42ad3d54cb3450a37ecd36546b0abd5f71481168b25b384f04831555e806dd50dc185e327a923060fe4144209baadb10ee4dda4baad49c6941d26d3a03ca17e8 @@ -18,4 +19,4 @@ AUX mixxx-2.1.0-pioneer-ddj-sx-mapping-bugfixes.patch 11255 BLAKE2B 9e15935f3fcf AUX mixxx-2.1.0-swap-default-values-for-temp-perm-ratechanges.patch 1534 BLAKE2B 30e2c7fe396919fcdfba7102f360e307e2104bfa6480ec5615bc1482f2e496f99435d745468621f6ff7ae15e0e4857fd6db692061cf5d7b19b0bc7672b889aea SHA512 e0c6365f26313935b503de36edb9ed247333e892352645d5379659bc7a53761b7b24d1a162dee38cb776e17f5e8741d5235713d47f5812975169395bb4d00f05 AUX mixxx-2.1.0-use-an-in-memory-database-to-speed-up-library-tests.patch 3086 BLAKE2B d2cb0b7992cdb07b1ba2accde1d272cd3f75adf8bd3bb2450ad9203db5d7978c9b29dbf6e278a2a1f1fb8fb84f28b23f276f0f999b3e5d77c272b91716dcc9f1 SHA512 a6fefbc80f8facc8cd0bf501858b4dadb6ebe4bf476dc97273ad7e97ae2c0840ca9bd6b0b3aaa34caa837b967ee7fa12635c7c2957241ca6aff5a26531b6e25f DIST mixxx-2.1.0-src.tar.gz 34835250 BLAKE2B 7a90c3794a146001fd0df6bb7c9c6231c0d26814eafc5c83da666d511d7af0e193b75da9b8728ad399dbef208cf2437881df2c87818e503945b02591bc300567 SHA512 d9f4fab92c2896ec455e2041aa6033f9a9091d2915a185a99427b9c35afe7c99565350ce477bf0487c6276c9585875f0be61f310779ae90195917d2e995bbf90 -EBUILD mixxx-2.1.0.ebuild 3950 BLAKE2B e14a8a50babaa4d306714f88e70489c3afcc5ff4f764d520119889127481dd84cbf4b98b3a23aa6fb8b987ffe0f4b5bb2f7e8f8869d5d5455bd91810351b6577 SHA512 b27c1832f70fb43fc630fcc5a8bfc4ad8c84bfbab4fa3eb01c49b16dbc0f76db71226d87e9327d9494ab78e4fc8af7cab79e05f7230898bf6d7144973af85dad +EBUILD mixxx-2.1.0.ebuild 4022 BLAKE2B c54d9fba59d76a6c6119f29e5e549c324f1afda4aaddda572b0d6c3216566d6765bce280f33fe48c4a3d40ff580f3e03e52d10247e9b54dcc1bbd6686f4ccd7f SHA512 e4406c1d6efe023ab7533c358bbc7761f39126e3d5a96ee0004fc5089976b8636bd5770966356e84971e627ac631630a85a9718051d0f5c99ec147b1502f084d diff --git a/media-sound/mixxx/files/mixxx-2.1.0-fix-decoding-of-improperly-encoded-flac-files.patch b/media-sound/mixxx/files/mixxx-2.1.0-fix-decoding-of-improperly-encoded-flac-files.patch new file mode 100644 index 0000000..e9b6940 --- /dev/null +++ b/media-sound/mixxx/files/mixxx-2.1.0-fix-decoding-of-improperly-encoded-flac-files.patch @@ -0,0 +1,217 @@ +From 32b9065dba36e0061adbaf4721ef159e362c398f Mon Sep 17 00:00:00 2001 +From: Uwe Klotz +Date: Tue, 8 May 2018 10:47:45 +0200 +Subject: [PATCH 1/3] Fix decoding of improperly encoded FLAC files + +--- + src/sources/soundsourceflac.cpp | 27 +++++++++++++++++++++++---- + 1 file changed, 23 insertions(+), 4 deletions(-) + +diff --git a/src/sources/soundsourceflac.cpp b/src/sources/soundsourceflac.cpp +index 01dfc00149..3d68e05ce7 100644 +--- a/src/sources/soundsourceflac.cpp ++++ b/src/sources/soundsourceflac.cpp +@@ -345,6 +345,25 @@ FLAC__bool SoundSourceFLAC::flacEOF() { + return m_file.atEnd(); + } + ++inline ++FLAC__int32 adjustDecodedSample(FLAC__int32 decodedSample, SINT bitsPerSample) { ++ // Workaround for improperly encoded FLAC files that may contain ++ // garbage in the most significant, unused bits of decoded samples. ++ // Required at least for libFLAC 1.3.2. This workaround might become ++ // obsolete once libFLAC is taking care of these issues internally. ++ // https://bugs.launchpad.net/mixxx/+bug/1769717 ++ // https://hydrogenaud.io/index.php/topic,61792.msg559045.html#msg559045 ++ FLAC__int32 signBit = static_cast(1) << (bitsPerSample - 1); ++ FLAC__int32 bitMask = (static_cast(1) << bitsPerSample) - 1; // == (signBit << 1) - 1 ++ FLAC__int32 maskedSample = decodedSample & bitMask; ++ if (maskedSample & signBit) { ++ // Sign extension for negative values ++ return maskedSample | ~bitMask; ++ } else { ++ return maskedSample; ++ } ++} ++ + FLAC__StreamDecoderWriteStatus SoundSourceFLAC::flacWrite( + const FLAC__Frame* frame, const FLAC__int32* const buffer[]) { + const SINT numChannels = frame->header.channels; +@@ -391,15 +410,15 @@ FLAC__StreamDecoderWriteStatus SoundSourceFLAC::flacWrite( + case 1: { + // optimized code for 1 channel (mono) + for (SINT i = 0; i < numWritableFrames; ++i) { +- *pSampleBuffer++ = buffer[0][i] * m_sampleScaleFactor; ++ *pSampleBuffer++ = adjustDecodedSample(buffer[0][i], m_bitsPerSample) * m_sampleScaleFactor; + } + break; + } + case 2: { + // optimized code for 2 channels (stereo) + for (SINT i = 0; i < numWritableFrames; ++i) { +- *pSampleBuffer++ = buffer[0][i] * m_sampleScaleFactor; +- *pSampleBuffer++ = buffer[1][i] * m_sampleScaleFactor; ++ *pSampleBuffer++ = adjustDecodedSample(buffer[0][i], m_bitsPerSample) * m_sampleScaleFactor; ++ *pSampleBuffer++ = adjustDecodedSample(buffer[1][i], m_bitsPerSample) * m_sampleScaleFactor; + } + break; + } +@@ -407,7 +426,7 @@ FLAC__StreamDecoderWriteStatus SoundSourceFLAC::flacWrite( + // generic code for multiple channels + for (SINT i = 0; i < numWritableFrames; ++i) { + for (SINT j = 0; j < channelCount(); ++j) { +- *pSampleBuffer++ = buffer[j][i] * m_sampleScaleFactor; ++ *pSampleBuffer++ = adjustDecodedSample(buffer[j][i], m_bitsPerSample) * m_sampleScaleFactor; + } + } + } + +From 79f7048a44dced6eccc61555bf02fdb5be02c560 Mon Sep 17 00:00:00 2001 +From: Uwe Klotz +Date: Wed, 2 May 2018 08:22:17 +0200 +Subject: [PATCH 2/3] Delete unused member function + +--- + src/library/dao/settingsdao.cpp | 4 ---- + src/library/dao/settingsdao.h | 6 ++---- + src/test/schemamanager_test.cpp | 2 -- + 3 files changed, 2 insertions(+), 10 deletions(-) + +diff --git a/src/library/dao/settingsdao.cpp b/src/library/dao/settingsdao.cpp +index 2e7f8cb7d1..5c56a98426 100644 +--- a/src/library/dao/settingsdao.cpp ++++ b/src/library/dao/settingsdao.cpp +@@ -5,13 +5,9 @@ + + SettingsDAO::SettingsDAO(const QSqlDatabase& db) + : m_db(db) { +-} + +-SettingsDAO::~SettingsDAO() { + +-} + +-void SettingsDAO::initialize() { + } + + QString SettingsDAO::getValue(const QString& name, QString defaultValue) const { +diff --git a/src/library/dao/settingsdao.h b/src/library/dao/settingsdao.h +index cd0d66bf3f..bcb95acd91 100644 +--- a/src/library/dao/settingsdao.h ++++ b/src/library/dao/settingsdao.h +@@ -12,12 +12,10 @@ + + + // All library-specific preferences go in the library settings table +-class SettingsDAO : public QObject { ++class SettingsDAO final : public QObject { + public: + SettingsDAO(const QSqlDatabase& db); +- virtual ~SettingsDAO(); +- +- virtual void initialize(); ++ ~SettingsDAO() override = default; + + QString getValue(const QString& name, QString defaultValue = QString()) const; + bool setValue(const QString& name, const QVariant& value); +diff --git a/src/test/schemamanager_test.cpp b/src/test/schemamanager_test.cpp +index bd24f79478..25d9e77fc5 100644 +--- a/src/test/schemamanager_test.cpp ++++ b/src/test/schemamanager_test.cpp +@@ -64,7 +64,6 @@ TEST_F(SchemaManagerTest, BackwardsCompatibleVersion) { + EXPECT_EQ(SchemaManager::Result::UpgradeSucceeded, result); + + SettingsDAO settings(dbConnection()); +- settings.initialize(); + + // Pretend the database version is one past the required version but + // min_compatible is the required version. +@@ -90,7 +89,6 @@ TEST_F(SchemaManagerTest, BackwardsIncompatibleVersion) { + EXPECT_EQ(SchemaManager::Result::UpgradeSucceeded, result); + + SettingsDAO settings(dbConnection()); +- settings.initialize(); + + // Pretend the database version is one past the required version and + // min_compatible is one past the required version. + +From 71934a9b6fee154de7de0be1a667df0a857a0aa8 Mon Sep 17 00:00:00 2001 +From: Uwe Klotz +Date: Wed, 2 May 2018 08:23:38 +0200 +Subject: [PATCH 3/3] Try to fix crash during database migration in macOS tests + +--- + src/library/dao/settingsdao.cpp | 37 ++++++++++++++++++++++++++++--------- + src/library/dao/settingsdao.h | 2 +- + 2 files changed, 29 insertions(+), 10 deletions(-) + +diff --git a/src/library/dao/settingsdao.cpp b/src/library/dao/settingsdao.cpp +index 5c56a98426..148409ab22 100644 +--- a/src/library/dao/settingsdao.cpp ++++ b/src/library/dao/settingsdao.cpp +@@ -3,24 +3,43 @@ + + #include "library/dao/settingsdao.h" + +-SettingsDAO::SettingsDAO(const QSqlDatabase& db) +- : m_db(db) { ++#include "util/logger.h" ++#include "util/assert.h" + ++namespace { + ++mixxx::Logger kLogger("SettingsDAO"); + ++} // anonymous namespace ++ ++SettingsDAO::SettingsDAO(const QSqlDatabase& db) ++ : m_db(db) { + } + + QString SettingsDAO::getValue(const QString& name, QString defaultValue) const { + QSqlQuery query(m_db); + +- query.prepare("SELECT value FROM settings WHERE name = :name"); +- query.bindValue(":name", name); +- +- QString value = defaultValue; +- if (query.exec() && query.first()) { +- value = query.value(query.record().indexOf("value")).toString(); ++ if (query.prepare("SELECT value FROM settings WHERE name = :name")) { ++ query.bindValue(":name", name); ++ if (query.exec() && query.first()) { ++ QVariant value = query.value(query.record().indexOf("value")); ++ VERIFY_OR_DEBUG_ASSERT(value.isValid()) { ++ kLogger.warning() << "Invalid value:" << value; ++ } else { ++ return value.toString(); ++ } ++ } ++ } else { ++ // Prepare is expected to fail for a fresh database ++ // when the schema is still empty! ++ kLogger.debug() ++ << "Failed to prepare query:" ++ << "Returning default value" ++ << defaultValue ++ << "for" ++ << name; + } +- return value; ++ return defaultValue; + } + + bool SettingsDAO::setValue(const QString& name, const QVariant& value) { +diff --git a/src/library/dao/settingsdao.h b/src/library/dao/settingsdao.h +index bcb95acd91..91ae8bb401 100644 +--- a/src/library/dao/settingsdao.h ++++ b/src/library/dao/settingsdao.h +@@ -14,7 +14,7 @@ + // All library-specific preferences go in the library settings table + class SettingsDAO final : public QObject { + public: +- SettingsDAO(const QSqlDatabase& db); ++ explicit SettingsDAO(const QSqlDatabase& db); + ~SettingsDAO() override = default; + + QString getValue(const QString& name, QString defaultValue = QString()) const; diff --git a/media-sound/mixxx/mixxx-2.1.0.ebuild b/media-sound/mixxx/mixxx-2.1.0.ebuild index 8377f98..b8f6a18 100644 --- a/media-sound/mixxx/mixxx-2.1.0.ebuild +++ b/media-sound/mixxx/mixxx-2.1.0.ebuild @@ -78,9 +78,10 @@ PATCHES=( "${FILESDIR}"/${P}-fix-flac-decoding-and-upgrade-db-schema.patch "${FILESDIR}"/${P}-fix-s4-mk2-for-windows.patch "${FILESDIR}"/${P}-pioneer-ddj-sx-mapping-bugfixes.patch + "${FILESDIR}"/${P}-deere-add-gain-knob-to-expanded-sampler-view.patch + "${FILESDIR}"/${P}-fix-decoding-of-improperly-encoded-flac-files.patch "${FILESDIR}"/${P}-fix-spinback-inertia-effect-partial-revert-of-2b612c2.patch "${FILESDIR}"/${P}-denon-mc6000mk2-use-ramping-for-back-spins.patch - "${FILESDIR}"/${P}-deere-add-gain-knob-to-expanded-sampler-view.patch ) S="${WORKDIR}/${PN}-release-${PV}"