aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorNorbert Lange2009-08-08 19:09:30 +0000
committerNorbert Lange2009-08-08 19:09:30 +0000
commit0350a1598deea8d1af252ddd96a490699d10e2e2 (patch)
tree11557d7a87ee5da2ee20e6c13e8be7d2607f393c /sound
parentdf06592be1b4c9904acde5a843d3ab3d076c65ac (diff)
parent65a39cc2b0ebb989444330c561743ba0466c1a9c (diff)
downloadscummvm-rg350-0350a1598deea8d1af252ddd96a490699d10e2e2.tar.gz
scummvm-rg350-0350a1598deea8d1af252ddd96a490699d10e2e2.tar.bz2
scummvm-rg350-0350a1598deea8d1af252ddd96a490699d10e2e2.zip
merge with trunk
svn-id: r43134
Diffstat (limited to 'sound')
-rw-r--r--sound/fmopl.h2
-rw-r--r--sound/midiparser_xmidi.cpp8
-rw-r--r--sound/softsynth/mt32/partial.cpp2
-rw-r--r--sound/softsynth/mt32/synth.cpp2
-rw-r--r--sound/softsynth/mt32/tables.cpp2
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