diff options
-rw-r--r-- | backends/midi/adlib.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/backends/midi/adlib.cpp b/backends/midi/adlib.cpp index 5e32d0496d..c856fca2d6 100644 --- a/backends/midi/adlib.cpp +++ b/backends/midi/adlib.cpp @@ -49,6 +49,8 @@ struct AdlibInstrument { byte flags_b; InstrumentExtra extra_b; byte duration; + + AdlibInstrument() { memset(this, 0, sizeof(AdlibInstrument)); } }; class AdlibPart : public MidiChannel { @@ -77,6 +79,22 @@ protected: void allocate() { _allocated = true; } public: + AdlibPart() { + _voice = 0; + _pitchbend = 0; + _transpose_eff = 0; + _vol_eff = 0; + _detune_eff = 0; + _modwheel = 0; + _pedal = 0; + _program = 0; + _pri_eff = 0; + + _owner = 0; + _allocated = false; + _channel = 0; + } + MidiDriver *device(); byte getNumber() { return _channel; } void release() { _allocated = false; } |