From 17fe3ce29e21e2d88830a88941474221c2fc2b98 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 27 Jul 2009 18:19:16 +0000 Subject: Oops enabled HACK to prevent multiple OPL instances again. svn-id: r42849 --- sound/fmopl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') 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; } /** -- cgit v1.2.3 From e779747ca4e86e52ab22b11591fcd16b79902407 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 29 Jul 2009 20:03:46 +0000 Subject: Fix typo, which made our "floorf" macro use "floorf" instead of "floor" on systems without "floorf". svn-id: r42904 --- sound/softsynth/mt32/partial.cpp | 2 +- sound/softsynth/mt32/synth.cpp | 2 +- sound/softsynth/mt32/tables.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sound') 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 -- cgit v1.2.3 From c455e135b2eb89e9bf250dce2c5765a6afb284e0 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 8 Aug 2009 13:57:21 +0000 Subject: Fix XMIDI looping implementation. Now for example the music in the ferret village of ITE plays fine. svn-id: r43126 --- sound/midiparser_xmidi.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sound') 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 -- cgit v1.2.3