aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound/music.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/sound/music.cpp')
-rw-r--r--engines/sci/sound/music.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index 7b8d5a0882..d81f2c8056 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -84,12 +84,13 @@ void SciMusic::init() {
_pMidiDrv = MidiPlayer_Midi_create(_soundVersion);
}
- if (_pMidiDrv) {
- _pMidiDrv->open();
+ if (_pMidiDrv && !_pMidiDrv->open()) {
_pMidiDrv->setTimerCallback(this, &miditimerCallback);
_dwTempo = _pMidiDrv->getBaseTempo();
- } else
- warning("Can't initialise music driver");
+ } else {
+ error("Failed to initialize sound driver");
+ }
+
_bMultiMidi = ConfMan.getBool("multi_midi");
}