From 7824d0e8e9116e2610072a92c99c6d80ae9db19f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 1 Sep 2012 20:15:12 +0300 Subject: SCI: Limit the hack used for sound initialization to the Fun Seeker's demo only --- engines/sci/sound/drivers/adlib.cpp | 3 +++ engines/sci/sound/music.cpp | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'engines/sci/sound') diff --git a/engines/sci/sound/drivers/adlib.cpp b/engines/sci/sound/drivers/adlib.cpp index db9317e071..191e13db0a 100644 --- a/engines/sci/sound/drivers/adlib.cpp +++ b/engines/sci/sound/drivers/adlib.cpp @@ -807,6 +807,9 @@ int MidiPlayer_AdLib::open(ResourceManager *resMan) { int size = f.size(); const uint patchSize = 1344; + // Note: Funseeker's Guide also has another version of adl.drv, 8803 bytes. + // This isn't supported, but it's not really used anywhere, as that demo + // doesn't have sound anyway. if ((size == 5684) || (size == 5720) || (size == 5727)) { byte *buf = new byte[patchSize]; diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index ffd51da673..a8a65d2aa4 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -125,10 +125,13 @@ void SciMusic::init() { _pMidiDrv->setTimerCallback(this, &miditimerCallback); _dwTempo = _pMidiDrv->getBaseTempo(); } else { - // Happens in the Fun Seeker's Guide demo, which doesn't have any sound - // anyway (nor works if anything other than PC Spearker is set), so this - // shouldn't be fatal - warning("Failed to initialize sound driver"); + if (g_sci->getGameId() == GID_FUNSEEKER) { + // HACK: The Fun Seeker's Guide demo doesn't have patch 3 and the version + // of the Adlib driver (adl.drv) that it includes is unsupported. That demo + // doesn't have any sound anyway, so this shouldn't be fatal. + } else { + error("Failed to initialize sound driver"); + } } // Find out what the first possible channel is (used, when doing channel -- cgit v1.2.3