Skip to content

Commit

Permalink
STARTREK: Initialize some variables in sound
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Aug 30, 2018
1 parent 0a70f6f commit 9ac5f6c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engines/startrek/sound.cpp
Expand Up @@ -35,6 +35,10 @@ namespace StarTrek {
// Main Sound Functions // Main Sound Functions


Sound::Sound(StarTrekEngine *vm) : _vm(vm) { Sound::Sound(StarTrekEngine *vm) : _vm(vm) {
_midiDevice = MT_INVALID;
_midiDriver = nullptr;
_loopingMidiTrack = false;

if (_vm->getPlatform() == Common::kPlatformDOS || _vm->getPlatform() == Common::kPlatformMacintosh) { if (_vm->getPlatform() == Common::kPlatformDOS || _vm->getPlatform() == Common::kPlatformMacintosh) {
_midiDevice = MidiDriver::detectDevice(MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32); _midiDevice = MidiDriver::detectDevice(MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32);
_midiDriver = MidiDriver::createMidi(_midiDevice); _midiDriver = MidiDriver::createMidi(_midiDevice);
Expand Down

0 comments on commit 9ac5f6c

Please sign in to comment.