diff options
Diffstat (limited to 'backends')
-rw-r--r-- | backends/midi/adlib.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/backends/midi/adlib.cpp b/backends/midi/adlib.cpp index 39ded6396e..dbe60235f5 100644 --- a/backends/midi/adlib.cpp +++ b/backends/midi/adlib.cpp @@ -828,12 +828,27 @@ void AdlibPercussionChannel::noteOn (byte note, byte velocity) { MidiDriver_ADLIB::MidiDriver_ADLIB() { uint i; + + _isOpen = false; + _game_SmallHeader = false; + + _adlib_reg_cache = 0; + _mixer = 0; + + _timer_proc = 0; + _timer_param = 0; + + _adlib_timer_counter = 0; + _voice_index = 0; + _next_tick = 0; + for (i = 0; i < ARRAYSIZE(curnote_table); ++i) { + curnote_table[i] = 0; + } + for (i = 0; i < ARRAYSIZE(_parts); ++i) { _parts[i].init (this, i); } _percussion.init (this, 0); - _game_SmallHeader = false; - _isOpen = false; } int MidiDriver_ADLIB::open() { |