--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: tg@mirbsd.de
Please unblock package polyphone
[ Reason ]
The current release contains a regression where large soundfont
sample offsets are not correctly encoded.
[ Impact ]
Silently produces bad output for large sample offsets. This kind
of corruption is hard to manually test for.
[ Tests ]
The submitter of the patch tested the package, although not the
precise binary but a recompilation from the same sources in my PPA.
[ Risks ]
Low, leaf package, merely reverts part of an upstream commit.
[ Checklist ]
[x] all changes are documented in the d/changelog
[x] I reviewed all changes and I approve them
[x] attach debdiff against the package in testing
[ Other info ]
unblock polyphone/2.2.0.20210109+dfsg1-2
diff -Nru polyphone-2.2.0.20210109+dfsg1/debian/changelog polyphone-2.2.0.20210109+dfsg1/debian/changelog
--- polyphone-2.2.0.20210109+dfsg1/debian/changelog 2021-01-19 23:14:12.000000000 +0100
+++ polyphone-2.2.0.20210109+dfsg1/debian/changelog 2021-06-06 15:22:08.000000000 +0200
@@ -1,3 +1,9 @@
+polyphone (2.2.0.20210109+dfsg1-2) unstable; urgency=medium
+
+ * Add patch to fix large soundfonts/samples’ offsets
+
+ -- Thorsten Glaser <tg@mirbsd.de> Sun, 06 Jun 2021 15:22:08 +0200
+
polyphone (2.2.0.20210109+dfsg1-1) unstable; urgency=medium
* Improve compiler flags handling, via MuseScore packaging
diff -Nru polyphone-2.2.0.20210109+dfsg1/debian/patches/142.patch polyphone-2.2.0.20210109+dfsg1/debian/patches/142.patch
--- polyphone-2.2.0.20210109+dfsg1/debian/patches/142.patch 1970-01-01 01:00:00.000000000 +0100
+++ polyphone-2.2.0.20210109+dfsg1/debian/patches/142.patch 2021-06-06 15:21:55.000000000 +0200
@@ -0,0 +1,24 @@
+Description: allow offset values greater than 16-bit signed integer
+ A fix for issue #141, which was broken by commit
+ f80fc38b406ad094a1d3d2563da5d8124818e2e3. This fix reverts to the
+ use of qRound when storing offset values for sample and loop start/end.
+From: "S. Christian Collins" <s_chriscollins@hotmail.com>
+Origin: https://github.com/davy7125/polyphone/pull/142
+Bug: https://github.com/davy7125/polyphone/issues/141
+
+--- a/sources/core/types/attribute.cpp
++++ b/sources/core/types/attribute.cpp
+@@ -181,11 +181,11 @@ AttributeValue Attribute::fromRealValue(
+ break;
+ case champ_startloopAddrsCoarseOffset: case champ_endloopAddrsCoarseOffset:
+ case champ_startAddrsCoarseOffset: case champ_endAddrsCoarseOffset:
+- storedValue.shValue = Utils::round16(realValue) / 32768;
++ storedValue.shValue = static_cast<qint16>(qRound(realValue) / 32768);
+ break;
+ case champ_startloopAddrsOffset: case champ_startAddrsOffset:
+ case champ_endloopAddrsOffset: case champ_endAddrsOffset:
+- storedValue.shValue = static_cast<qint16>(Utils::round16(realValue) % 32768);
++ storedValue.shValue = static_cast<qint16>(qRound(realValue) % 32768);
+ break;
+ case champ_keyRange: case champ_velRange:
+ storedValue.rValue.byHi = static_cast<quint8>(0.001 * realValue);
diff -Nru polyphone-2.2.0.20210109+dfsg1/debian/patches/series polyphone-2.2.0.20210109+dfsg1/debian/patches/series
--- polyphone-2.2.0.20210109+dfsg1/debian/patches/series 2021-01-19 23:12:32.000000000 +0100
+++ polyphone-2.2.0.20210109+dfsg1/debian/patches/series 2021-06-06 15:16:36.000000000 +0200
@@ -2,3 +2,4 @@
branding.diff
fix-build.diff
reproducible.diff
+142.patch
--- End Message ---