diff options
author | Torbjörn Andersson | 2010-07-16 03:31:45 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2010-07-16 03:31:45 +0000 |
commit | b4459fe92338d1d83cac909519174456402d716e (patch) | |
tree | b62533294e9b1374a148f0441a4a6f1ebeca5c49 /sound | |
parent | 992a8bfd3f05fc54aee3e25905d037ad0814a469 (diff) | |
download | scummvm-rg350-b4459fe92338d1d83cac909519174456402d716e.tar.gz scummvm-rg350-b4459fe92338d1d83cac909519174456402d716e.tar.bz2 scummvm-rg350-b4459fe92338d1d83cac909519174456402d716e.zip |
Cleanup.
svn-id: r50926
Diffstat (limited to 'sound')
-rw-r--r-- | sound/midiparser.cpp | 4 | ||||
-rw-r--r-- | sound/midiparser_smf.cpp | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sound/midiparser.cpp b/sound/midiparser.cpp index d58471765e..929b1d8b12 100644 --- a/sound/midiparser.cpp +++ b/sound/midiparser.cpp @@ -333,7 +333,7 @@ void MidiParser::hangAllActiveNotes() { uint32 advance_tick = _position._last_event_tick; while (true) { - int i, j; + int i; for (i = 0; i < 128; ++i) if (temp_active[i] != 0) break; @@ -349,7 +349,7 @@ void MidiParser::hangAllActiveNotes() { } else if (_next_event.event == 0xFF && _next_event.ext.type == 0x2F) { // warning("MidiParser::hangAllActiveNotes(): Hit End of Track with active notes left"); for (i = 0; i < 128; ++i) { - for (j = 0; j < 16; ++j) { + for (int j = 0; j < 16; ++j) { if (temp_active[i] & (1 << j)) { activeNote(j, i, false); sendToDriver(0x80 | j, i, 0); diff --git a/sound/midiparser_smf.cpp b/sound/midiparser_smf.cpp index 4261b1d770..a9c6f1eb3b 100644 --- a/sound/midiparser_smf.cpp +++ b/sound/midiparser_smf.cpp @@ -230,10 +230,8 @@ bool MidiParser_SMF::loadMusic(byte *data, uint32 size) { // If this is a Type 1 MIDI, we need to now compress // our tracks down into a single Type 0 track. - if (_buffer) { - free(_buffer); - _buffer = 0; - } + free(_buffer); + _buffer = 0; if (midi_type == 1) { // FIXME: Doubled the buffer size to prevent crashes with the |