From e991cd8c53ad21af037df1e0a16816aeea2d0fe2 Mon Sep 17 00:00:00 2001 From: Alejandro Marzini Date: Wed, 9 Jun 2010 20:09:57 +0000 Subject: - Revised abstract AudioCDManager. - Removed AudioCDManager Singleton, and changed code for using AudioCDManager in OSystem. - Added initialization code for new AudioCDManager in BaseBackend and OSystem_SDL. svn-id: r49548 --- engines/drascula/drascula.cpp | 2 +- engines/drascula/sound.cpp | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'engines/drascula') diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 2c3ca63600..dc1d54b808 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -100,7 +100,7 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam int cd_num = ConfMan.getInt("cdrom"); if (cd_num >= 0) - _system->openCD(cd_num); + _system->getAudioCD()->openCD(cd_num); _lang = kEnglish; diff --git a/engines/drascula/sound.cpp b/engines/drascula/sound.cpp index ad9ec6ca5e..934610ba4d 100644 --- a/engines/drascula/sound.cpp +++ b/engines/drascula/sound.cpp @@ -23,7 +23,6 @@ * */ -#include "sound/audiocd.h" #include "sound/audiostream.h" #include "sound/mixer.h" #include "sound/decoders/raw.h" @@ -123,20 +122,20 @@ void DrasculaEngine::finishSound() { } void DrasculaEngine::playMusic(int p) { - AudioCD.stop(); - AudioCD.play(p - 1, 1, 0, 0); + _system->getAudioCD()->stop(); + _system->getAudioCD()->play(p - 1, 1, 0, 0); } void DrasculaEngine::stopMusic() { - AudioCD.stop(); + _system->getAudioCD()->stop(); } void DrasculaEngine::updateMusic() { - AudioCD.updateCD(); + _system->getAudioCD()->updateCD(); } int DrasculaEngine::musicStatus() { - return AudioCD.isPlaying(); + return _system->getAudioCD()->isPlaying(); } void DrasculaEngine::stopSound() { @@ -157,7 +156,7 @@ void DrasculaEngine::MusicFadeout() { _system->updateScreen(); _system->delayMillis(50); } - AudioCD.stop(); + _system->getAudioCD()->stop(); _system->delayMillis(100); _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, org_vol); } -- cgit v1.2.3 From e1ef3cd9fc059ebe8c606d330173bc3f71f8dce7 Mon Sep 17 00:00:00 2001 From: Alejandro Marzini Date: Tue, 15 Jun 2010 04:13:12 +0000 Subject: Renamed getAudioCD to getAudioCDManager. svn-id: r49678 --- engines/drascula/drascula.cpp | 2 +- engines/drascula/sound.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'engines/drascula') diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index dc1d54b808..39f07e5875 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -100,7 +100,7 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam int cd_num = ConfMan.getInt("cdrom"); if (cd_num >= 0) - _system->getAudioCD()->openCD(cd_num); + _system->getAudioCDManager()->openCD(cd_num); _lang = kEnglish; diff --git a/engines/drascula/sound.cpp b/engines/drascula/sound.cpp index 934610ba4d..2233115f3d 100644 --- a/engines/drascula/sound.cpp +++ b/engines/drascula/sound.cpp @@ -122,20 +122,20 @@ void DrasculaEngine::finishSound() { } void DrasculaEngine::playMusic(int p) { - _system->getAudioCD()->stop(); - _system->getAudioCD()->play(p - 1, 1, 0, 0); + _system->getAudioCDManager()->stop(); + _system->getAudioCDManager()->play(p - 1, 1, 0, 0); } void DrasculaEngine::stopMusic() { - _system->getAudioCD()->stop(); + _system->getAudioCDManager()->stop(); } void DrasculaEngine::updateMusic() { - _system->getAudioCD()->updateCD(); + _system->getAudioCDManager()->updateCD(); } int DrasculaEngine::musicStatus() { - return _system->getAudioCD()->isPlaying(); + return _system->getAudioCDManager()->isPlaying(); } void DrasculaEngine::stopSound() { @@ -156,7 +156,7 @@ void DrasculaEngine::MusicFadeout() { _system->updateScreen(); _system->delayMillis(50); } - _system->getAudioCD()->stop(); + _system->getAudioCDManager()->stop(); _system->delayMillis(100); _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, org_vol); } -- cgit v1.2.3