Commit graph

18 commits

Author SHA1 Message Date
Eric Fontaine
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.
2019-07-04 19:36:33 -04:00
James Thistlewood
7bcfe21269 switch to expressive patches based on sf name 2019-04-19 19:31:50 +01:00
Joachim Schmitz
ff292d98b2 eliminate debug artifacts 2018-12-18 14:55:54 +01:00
anatoly-os
6e24695f1b Reverted "Merge pull request #4073 from janisozaur/master"
Reverted 6c91d1df28 due to not signed CLA
2018-11-11 14:42:44 +02:00
Michał Janiszewski
6c91d1df28
Catch exceptions by const-ref rather than by value 2018-10-28 14:00:15 -07:00
Joachim Schmitz
b27817fe19 fix more MSVC warnings
* The one C4100
* The one C4189
* The two C4457
* The two C4701
* The 475 C4267, changing to size_t were easily possible, casting to
int elsewhere
* Fix GCC warnings reg. wrong printf format for a size_t, reg. unused
variables and reg. ambigous else branch, seen on Travis CI
2018-09-11 16:56:50 +02:00
anatoly-os
f50c7778ab fix loading soundfonts to synth
Fix mutex locking
Fix progress bar drawing
2018-09-04 21:52:05 +02:00
anatoly-os
c5feea62ca lock synth mutex when closing MuseScore to prevent writing samples to deleted data structures
Optimize using raw pointer arrays - replace them with std::vector.
2018-08-30 20:44:07 +02:00
Andres Fernandez de Prado
33dff96a20 This commit contains changes required for MuseScore to compile under MSVC with no warnings.
This commit contains changes required for MuseScore to compile under MSVC with no warnings.

MuseScore is being compiled with the /W4 setting (warning level 4), which is similar to -wall -wextra on clang. This generates lots of warnings on MSVC, mainly for non-standard constructs and for constructs which might be bugs or might lead to bugs.

Most warnings are in the following categories:
- Name hiding: a variable hides a variable with the same name on a larger scope (or a field, or a function parameter). This can easily lead to bugs, and it is a best practice to avoid hiding variable names (see recommendation ES.12 in the C++ Core Guidelines by Stroustrop & Sutter (http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-reuse : ES.12: Do not reuse names in nested scopes)
- Narrowing conversion: a numeric conversion results in loss of significant digits (for example, double -> float). The general recommendation is to use a cast to indicate this is designed behaviour.
- Unreachable code: in several instances, there is unreachable code. The unreachable code is commented out.
- (Potentially) uninitialized local variable. Just initialized the vars.
- foreach(,) -> for(:): this does not generate a warning per-se (only a few of these generate warnings due to name hiding), but changed in keeping with "MuseScore Coding Rules" (https://musescore.org/en/handbook/musescore-coding-rules#Loops), which tells explicitly "Use C++11's "for" instead of Qt's "foreach":" ... "If you happen to be fixing some code and see a "foreach", please change that loop into a "for"."

Most changes are in the categories indicated above. The next listing shows detailed changes for files which are *not* of the aforementioned types.

- all.h: Disable warning C4127 (conditional expression is constant - generated in Qt header file qvector.h)
- awl/aslider.h: unreachable code.
- awl/knob.cpp: name hiding
- awl/mslider.cpp: name hiding
- awl/slider.cpp: name hiding
- bww2mxml/parser.cpp: name hiding
- effects/compressor/compressor.cpp: narrowing conversion
- effects/zita1/zitagui.cpp: name hiding
- fluid/fluid.cpp: foreach replacement. Name hiding.
- fluid/mod.cpp: name hiding.
- fluid/sfont.cpp: foreach replacement. Name hiding. Initialize vars.
- fluid/voice.cpp: Name hiding.
- libmscore/accidental.cpp: Name hiding.
- libmscore/ambitus.cpp: Initialize vars.
- libmscore/barline.cpp: Name hiding. Unreachable code.
- libmscore/beam.cpp: Name hiding.
- libmscore/chordrest.cpp: Unreachable code.
- libmscore/scorefile.cpp: Name hiding.
- manual/genManual.cpp: Name hiding. foreach replacement.
- midi/midifile.cpp: Name hiding. Unreachable code.
- omr/importpdf.cpp: Name hiding. foreach replacement.
- omr/omr.cpp: Name hiding. foreach replacement.
- omr/omrpage.cpp: Name hiding. foreach replacement.
- omr/omrview.cpp: Name hiding. foreach replacement.
- synthesizer/event.cpp: Unreachable code.
- zerberus\channel.cpp: Narrowing conversion.
- zerberus\instrument.cpp: Name hiding.
- zerberus\sfz.cpp: Name hiding.
- zerberus\voice.h: Suppress warning C4201: "nonstandard extension used: nameless struct/union"
- zerberus\zerberus.cpp: Name hiding. Unreferenced parameter.
- zerberus\zerberusgui.cpp: Name hiding.
2018-08-03 09:15:42 +02:00
alexandr
923b8dbf7d fix #167161 Make Fluid and Zerberus options the same
Make unification for Zerberus and Fluid GUI
Make logic for 'up' and 'down' arrows in Zerberus

Logic of adding SF in fluid are the same as zerberus
Create Progress Bar in Fluid
2018-07-06 15:53:35 +02:00
lasconic
b92a6e0525 fix crash reported in #270748 2018-03-30 22:53:51 +02:00
lasconic
9bd96cbbd5 fix #57976: MuseScore doesn't support soundfonts with 24 bit samples 2015-04-28 14:42:49 +02:00
ws
2f31c341a7 fix #43481 Wrong instrument played when using multiple SF2 soundfonts 2015-02-10 19:54:22 +01:00
AntonioBL
620dae1b25 some fixes from cppcheck analysis 2014-12-09 09:36:24 +01:00
Joachim Schmitz
3394f76c3a fix warning reg. expresion always false 2014-06-17 14:37:29 +02:00
ws
5d0b72796e fix #23191 2013-10-18 17:08:09 +02:00
ws
9559b2ce58 add c++ wrapper for sndfile, replace ogg routines in fluid with sndfile 2013-06-03 12:54:37 +02:00
Werner Schweer
412ca45401 Initial commit 2012-05-26 14:49:10 +02:00