diff options
author | Max Horn | 2003-05-20 14:17:18 +0000 |
---|---|---|
committer | Max Horn | 2003-05-20 14:17:18 +0000 |
commit | 7d4442fca5378bc4c813d85f7114885ebe1c8352 (patch) | |
tree | be0074d466e82b8e2b26811190431bdc98314894 /backends/midi | |
parent | d68de1d5e5fcdf226417b0ed6d93392473ad7e06 (diff) | |
download | scummvm-rg350-7d4442fca5378bc4c813d85f7114885ebe1c8352.tar.gz scummvm-rg350-7d4442fca5378bc4c813d85f7114885ebe1c8352.tar.bz2 scummvm-rg350-7d4442fca5378bc4c813d85f7114885ebe1c8352.zip |
yet more memoy init fixes
svn-id: r7727
Diffstat (limited to 'backends/midi')
-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; } |