diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/fmopl.h | 2 | ||||
-rw-r--r-- | sound/midiparser_xmidi.cpp | 8 | ||||
-rw-r--r-- | sound/softsynth/mt32/partial.cpp | 2 | ||||
-rw-r--r-- | sound/softsynth/mt32/synth.cpp | 2 | ||||
-rw-r--r-- | sound/softsynth/mt32/tables.cpp | 2 |
5 files changed, 10 insertions, 6 deletions
diff --git a/sound/fmopl.h b/sound/fmopl.h index d0b15368e0..688da4f1ba 100644 --- a/sound/fmopl.h +++ b/sound/fmopl.h @@ -94,7 +94,7 @@ private: // TODO: This is part of a temporary HACK to allow only 1 instance static bool _hasInstance; public: - OPL() { _hasInstance = true; } + OPL() { assert(!_hasInstance); _hasInstance = true; } virtual ~OPL() { _hasInstance = false; } /** diff --git a/sound/midiparser_xmidi.cpp b/sound/midiparser_xmidi.cpp index f7d5e9c32a..343ca34659 100644 --- a/sound/midiparser_xmidi.cpp +++ b/sound/midiparser_xmidi.cpp @@ -115,6 +115,8 @@ void MidiParser_XMIDI::parseNextEvent(EventInfo &info) { byte *pos = _position._play_pos; if (_loopCount < ARRAYSIZE(_loop) - 1) _loopCount++; + else + warning("XMIDI: Exceeding maximum loop count %d", ARRAYSIZE(_loop)); _loop[_loopCount].pos = pos; _loop[_loopCount].repeat = info.basic.param2; @@ -127,11 +129,14 @@ void MidiParser_XMIDI::parseNextEvent(EventInfo &info) { // End the current loop. _loopCount--; } else { - _position._play_pos = _loop[_loopCount].pos; // Repeat 0 means "loop forever". if (_loop[_loopCount].repeat) { if (--_loop[_loopCount].repeat == 0) _loopCount--; + else + _position._play_pos = _loop[_loopCount].pos; + } else { + _position._play_pos = _loop[_loopCount].pos; } } } @@ -155,7 +160,6 @@ void MidiParser_XMIDI::parseNextEvent(EventInfo &info) { warning("Unsupported XMIDI controller %d (0x%2x)", info.basic.param1, info.basic.param1); } - break; } // Should we really keep passing the XMIDI controller events to diff --git a/sound/softsynth/mt32/partial.cpp b/sound/softsynth/mt32/partial.cpp index 871eff03d2..f016084d8c 100644 --- a/sound/softsynth/mt32/partial.cpp +++ b/sound/softsynth/mt32/partial.cpp @@ -36,7 +36,7 @@ // Hence we re-define them here. The only potential drawback is that it // might be a little bit slower this way. #define powf(x,y) ((float)pow(x,y)) -#define floorf(x) ((float)floorf(x)) +#define floorf(x) ((float)floor(x)) #define fabsf(x) ((float)fabs(x)) #endif diff --git a/sound/softsynth/mt32/synth.cpp b/sound/softsynth/mt32/synth.cpp index 547b2bb9b3..c8b7abdf67 100644 --- a/sound/softsynth/mt32/synth.cpp +++ b/sound/softsynth/mt32/synth.cpp @@ -36,7 +36,7 @@ // Hence we re-define them here. The only potential drawback is that it // might be a little bit slower this way. #define powf(x,y) ((float)pow(x,y)) -#define floorf(x) ((float)floorf(x)) +#define floorf(x) ((float)floor(x)) #define fabsf(x) ((float)fabs(x)) #endif diff --git a/sound/softsynth/mt32/tables.cpp b/sound/softsynth/mt32/tables.cpp index 16fc4f71e5..571750ee99 100644 --- a/sound/softsynth/mt32/tables.cpp +++ b/sound/softsynth/mt32/tables.cpp @@ -36,7 +36,7 @@ // Hence we re-define them here. The only potential drawback is that it // might be a little bit slower this way. #define powf(x,y) ((float)pow(x,y)) -#define floorf(x) ((float)floorf(x)) +#define floorf(x) ((float)floor(x)) #define fabsf(x) ((float)fabs(x)) #endif |