aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
Diffstat (limited to 'audio')
-rw-r--r--audio/softsynth/mt32/MidiEventQueue.h1
-rw-r--r--audio/softsynth/mt32/Synth.cpp8
2 files changed, 8 insertions, 1 deletions
diff --git a/audio/softsynth/mt32/MidiEventQueue.h b/audio/softsynth/mt32/MidiEventQueue.h
index c5174d6cc9..32a0bbe553 100644
--- a/audio/softsynth/mt32/MidiEventQueue.h
+++ b/audio/softsynth/mt32/MidiEventQueue.h
@@ -32,6 +32,7 @@ struct MidiEvent {
Bit32u sysexLength;
Bit32u timestamp;
+ MidiEvent();
~MidiEvent();
void setShortMessage(Bit32u shortMessageData, Bit32u timestamp);
void setSysex(const Bit8u *sysexData, Bit32u sysexLength, Bit32u timestamp);
diff --git a/audio/softsynth/mt32/Synth.cpp b/audio/softsynth/mt32/Synth.cpp
index 62810ba3e6..a0d6631fab 100644
--- a/audio/softsynth/mt32/Synth.cpp
+++ b/audio/softsynth/mt32/Synth.cpp
@@ -1753,6 +1753,13 @@ Bit32s Synth::getMasterTunePitchDelta() const {
return extensions.masterTunePitchDelta;
}
+MidiEvent::MidiEvent() {
+ shortMessageData = 0;
+ sysexData = NULL;
+ sysexLength = 0;
+ timestamp = 0;
+}
+
MidiEvent::~MidiEvent() {
if (sysexData != NULL) {
delete[] sysexData;
@@ -1782,7 +1789,6 @@ void MidiEvent::setSysex(const Bit8u *useSysexData, Bit32u useSysexLength, Bit32
}
MidiEventQueue::MidiEventQueue(Bit32u useRingBufferSize) : ringBuffer(new MidiEvent[useRingBufferSize]), ringBufferMask(useRingBufferSize - 1) {
- memset(ringBuffer, 0, useRingBufferSize * sizeof(MidiEvent));
reset();
}