aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/sound_towns.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2015-09-29 01:19:09 -0400
committerJohannes Schickel2016-03-13 13:53:20 +0100
commitfc8480c84582d83556fc70f8a8fed004bbe9f766 (patch)
treef651b0b628337d4a4e9a40cfa90c6243ee01971e /engines/kyra/sound_towns.cpp
parente9441aa809634900ad4cbd414510f057f62329f2 (diff)
downloadscummvm-rg350-fc8480c84582d83556fc70f8a8fed004bbe9f766.tar.gz
scummvm-rg350-fc8480c84582d83556fc70f8a8fed004bbe9f766.tar.bz2
scummvm-rg350-fc8480c84582d83556fc70f8a8fed004bbe9f766.zip
KYRA: Ensure openCD() is called
Diffstat (limited to 'engines/kyra/sound_towns.cpp')
-rw-r--r--engines/kyra/sound_towns.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index 65ab4f31ef..b269cb4d67 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -68,6 +68,9 @@ bool SoundTowns::init() {
_player->driver()->intf()->callback(70, 0x33);*/
_player->driver()->setOutputVolume(1, 118, 118);
+ // Initialize CD for audio
+ g_system->getAudioCDManager()->openCD();
+
return true;
}
@@ -407,6 +410,10 @@ bool SoundPC98::init() {
_driver = new TownsPC98_AudioDriver(_mixer, TownsPC98_AudioDriver::kType26);
bool reslt = _driver->init();
updateVolumeSettings();
+
+ // Initialize CD for audio
+ g_system->getAudioCDManager()->openCD();
+
return reslt;
}
@@ -529,6 +536,10 @@ bool SoundTownsPC98_v2::init() {
if (_resInfo[_currentResourceSet])
if (_resInfo[_currentResourceSet]->cdaTableSize)
_vm->checkCD();
+
+ // Initialize CD for audio
+ bool hasRealCD = g_system->getAudioCDManager()->openCD();
+
// FIXME: While checking for 'track1.XXX(X)' looks like
// a good idea, we should definitely not be doing this
// here. Basically our filenaming scheme could change
@@ -538,7 +549,7 @@ bool SoundTownsPC98_v2::init() {
// check if we have access to CD audio.
Resource *r = _vm->resource();
if (_musicEnabled &&
- (r->exists("track1.mp3") || r->exists("track1.ogg") || r->exists("track1.flac") || r->exists("track1.fla")
+ (hasRealCD || r->exists("track1.mp3") || r->exists("track1.ogg") || r->exists("track1.flac") || r->exists("track1.fla")
|| r->exists("track01.mp3") || r->exists("track01.ogg") || r->exists("track01.flac") || r->exists("track01.fla")))
_musicEnabled = 2;
else