fluid synth's sample pitchadj signed char value incorrectly read on ARM cpus, causing incorrectly-pitched synthesis
Reported version
3.2
Type
Functional
Frequency
Many
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
ARM cpu's do not presume that a "char" is signed, unless explicitly called a "signed char". This causes problems, because on x86 machines, a "char" is presumed to be signed. There have been a few other spots in code where a char is presumed to be signed but not explicitly declared as signed.
Issue reported as: https://musescore.org/en/node/291747
This specific problem is due to fluid synth's integer sample->pitchadj being read from the file as a unspecified char, when it must be read as a signed char to preserve sign.
Fix version
3.3.0
Comments
PR ready for review: https://github.com/musescore/MuseScore/pull/5203
Fixed in branch master, commit 4253d779cf
_fix #291756 explicitly-signed char fluid pitchadj
C standards say that "char" may either be a "signed char" or "unsigned char" but that it is up to the compilers implementation or the platform which is followed. Some non x86 platforms, including PowerPC and ARM, treat unspecified chars as unsigned chars, so it is necessary to explicitly declare them as "signed char" (or to compile with "--signed_chars").
This fix ensures that fluid synth's sample's pitchadj value are correctly read as signed._
Fixed in branch master, commit e220f883f6
_Merge pull request #5203 from ericfont/291756-signed-char-fluid-pitchadj
fix #291756 explicitly-signed char fluid pitchadj_
Automatically closed -- issue fixed for 2 weeks with no activity.