From aa6ff444408bfd17bcca1d8364e86ce62da327ef Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 6 Oct 2015 22:10:34 -0400 Subject: BACKENDS: Only expose one set of functions for AudioCDManager Engines should only have to call one set of functions and not decide between the two. In fact, the 'emulation' API was documented to just call the 'real CD' API. --- engines/agos/event.cpp | 4 ++-- engines/cine/main_loop.cpp | 2 +- engines/cine/sound.cpp | 2 +- engines/drascula/drascula.cpp | 2 +- engines/drascula/sound.cpp | 2 +- engines/gob/gob.cpp | 2 +- engines/groovie/groovie.cpp | 2 +- engines/kyra/sound_towns.cpp | 20 ++++++++++---------- engines/made/made.cpp | 4 ++-- engines/sci/sound/audio.cpp | 2 +- engines/scumm/scumm.cpp | 2 +- engines/scumm/sound.cpp | 2 +- engines/teenagent/teenagent.cpp | 2 +- engines/tinsel/tinsel.cpp | 4 ++-- 14 files changed, 26 insertions(+), 26 deletions(-) (limited to 'engines') diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp index 95bcc68234..5240cdd771 100644 --- a/engines/agos/event.cpp +++ b/engines/agos/event.cpp @@ -427,7 +427,7 @@ void AGOSEngine::delay(uint amount) { uint32 cur = start; uint this_delay, vgaPeriod; - _system->getAudioCDManager()->updateCD(); + _system->getAudioCDManager()->update(); _debugger->onFrame(); @@ -538,7 +538,7 @@ void AGOSEngine::delay(uint amount) { if (_leftButton == 1) _leftButtonCount++; - _system->getAudioCDManager()->updateCD(); + _system->getAudioCDManager()->update(); _system->updateScreen(); diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp index e52fc464d5..19a2d8a82e 100644 --- a/engines/cine/main_loop.cpp +++ b/engines/cine/main_loop.cpp @@ -222,7 +222,7 @@ void manageEvents() { mouseData.left = mouseLeft; mouseData.right = mouseRight; - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); } void getMouseData(uint16 param, uint16 *pButton, uint16 *pX, uint16 *pY) { diff --git a/engines/cine/sound.cpp b/engines/cine/sound.cpp index 0e7da2e2bc..a8b4c085ff 100644 --- a/engines/cine/sound.cpp +++ b/engines/cine/sound.cpp @@ -942,7 +942,7 @@ PCSound::PCSound(Audio::Mixer *mixer, CineEngine *vm) // Ensure the CD is open if (_vm->getGameType() == GType_FW && (_vm->getFeatures() & GF_CD)) - g_system->getAudioCDManager()->openCD(); + g_system->getAudioCDManager()->open(); } PCSound::~PCSound() { diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 1a7659fc85..9ac9031fb7 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -183,7 +183,7 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam const Common::FSNode gameDataDir(ConfMan.get("path")); SearchMan.addSubDirectoryMatching(gameDataDir, "audio"); - _system->getAudioCDManager()->openCD(); + _system->getAudioCDManager()->open(); _lang = kEnglish; diff --git a/engines/drascula/sound.cpp b/engines/drascula/sound.cpp index 148dae76f5..c576b37660 100644 --- a/engines/drascula/sound.cpp +++ b/engines/drascula/sound.cpp @@ -133,7 +133,7 @@ void DrasculaEngine::stopMusic() { } void DrasculaEngine::updateMusic() { - _system->getAudioCDManager()->updateCD(); + _system->getAudioCDManager()->update(); } int DrasculaEngine::musicStatus() { diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index df2d804bd2..d995f26d9f 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -296,7 +296,7 @@ Common::Error GobEngine::run() { if (isCD()) checkCD(); - _system->getAudioCDManager()->openCD(); + _system->getAudioCDManager()->open(); _global->_debugFlag = 1; _video->_doRangeClamp = true; diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index a25bf0008b..bbc290eccf 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -257,7 +257,7 @@ Common::Error GroovieEngine::run() { // the same cd if (getPlatform() != Common::kPlatformIOS) { checkCD(); - _system->getAudioCDManager()->openCD(); + _system->getAudioCDManager()->open(); } while (!shouldQuit()) { diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index b269cb4d67..646f908b94 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -69,13 +69,13 @@ bool SoundTowns::init() { _player->driver()->setOutputVolume(1, 118, 118); // Initialize CD for audio - g_system->getAudioCDManager()->openCD(); + g_system->getAudioCDManager()->open(); return true; } void SoundTowns::process() { - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); } void SoundTowns::playTrack(uint8 track) { @@ -98,7 +98,7 @@ void SoundTowns::playTrack(uint8 track) { if (_musicEnabled == 2 && trackNum != -1) { _player->driver()->setOutputVolume(1, 118, 118); g_system->getAudioCDManager()->play(trackNum + 1, loop ? -1 : 1, 0, 0); - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); _cdaPlaying = true; } else if (_musicEnabled) { playEuphonyTrack(READ_LE_UINT32(&res()->cdaTable[tTableIndex]), loop); @@ -111,7 +111,7 @@ void SoundTowns::playTrack(uint8 track) { void SoundTowns::haltTrack() { _lastTrack = -1; g_system->getAudioCDManager()->stop(); - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); _cdaPlaying = false; for (int i = 0; i < 6; i++) @@ -412,7 +412,7 @@ bool SoundPC98::init() { updateVolumeSettings(); // Initialize CD for audio - g_system->getAudioCDManager()->openCD(); + g_system->getAudioCDManager()->open(); return reslt; } @@ -478,7 +478,7 @@ void SoundPC98::playTrack(uint8 track) { void SoundPC98::haltTrack() { _lastTrack = -1; g_system->getAudioCDManager()->stop(); - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); _driver->reset(); } @@ -538,7 +538,7 @@ bool SoundTownsPC98_v2::init() { _vm->checkCD(); // Initialize CD for audio - bool hasRealCD = g_system->getAudioCDManager()->openCD(); + bool hasRealCD = g_system->getAudioCDManager()->open(); // FIXME: While checking for 'track1.XXX(X)' looks like // a good idea, we should definitely not be doing this @@ -591,7 +591,7 @@ void SoundTownsPC98_v2::loadSoundFile(Common::String file) { } void SoundTownsPC98_v2::process() { - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); } void SoundTownsPC98_v2::playTrack(uint8 track) { @@ -621,7 +621,7 @@ void SoundTownsPC98_v2::playTrack(uint8 track) { if (_musicEnabled == 2 && trackNum != -1) { g_system->getAudioCDManager()->play(trackNum+1, _driver->looping() ? -1 : 1, 0, 0); - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); } else if (_musicEnabled) { _driver->cont(); } @@ -632,7 +632,7 @@ void SoundTownsPC98_v2::playTrack(uint8 track) { void SoundTownsPC98_v2::haltTrack() { _lastTrack = -1; g_system->getAudioCDManager()->stop(); - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); _driver->reset(); } diff --git a/engines/made/made.cpp b/engines/made/made.cpp index 57130e277f..f1539297ee 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -67,7 +67,7 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng _console = new MadeConsole(this); - _system->getAudioCDManager()->openCD(); + _system->getAudioCDManager()->open(); _pmvPlayer = new PmvPlayer(this, _mixer); _res = new ResourceReader(); @@ -268,7 +268,7 @@ void MadeEngine::handleEvents() { } } - _system->getAudioCDManager()->updateCD(); + _system->getAudioCDManager()->update(); } diff --git a/engines/sci/sound/audio.cpp b/engines/sci/sound/audio.cpp index 5e5e8b0466..a74bfa245f 100644 --- a/engines/sci/sound/audio.cpp +++ b/engines/sci/sound/audio.cpp @@ -514,7 +514,7 @@ void AudioPlayer::stopSoundSync() { int AudioPlayer::audioCdPlay(int track, int start, int duration) { if (!_initCD) { // Initialize CD mode if we haven't already - g_system->getAudioCDManager()->openCD(); + g_system->getAudioCDManager()->open(); _initCD = true; } diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 680bdb2463..d9148ed300 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1275,7 +1275,7 @@ void ScummEngine::setupScumm() { // On some systems it's not safe to run CD audio games from the CD. if (_game.features & GF_AUDIOTRACKS && !Common::File::exists("CDDA.SOU")) { checkCD(); - _system->getAudioCDManager()->openCD(); + _system->getAudioCDManager()->open(); } // Create the sound manager diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp index 4d70ee8482..404bdd022c 100644 --- a/engines/scumm/sound.cpp +++ b/engines/scumm/sound.cpp @@ -1093,7 +1093,7 @@ int Sound::pollCD() const { void Sound::updateCD() { if (!_isLoomSteam) - g_system->getAudioCDManager()->updateCD(); + g_system->getAudioCDManager()->update(); } AudioCDManager::Status Sound::getCDStatus() { diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp index f5d9f72cc3..4dc785754c 100644 --- a/engines/teenagent/teenagent.cpp +++ b/engines/teenagent/teenagent.cpp @@ -547,7 +547,7 @@ Common::Error TeenAgentEngine::run() { // Initialize CD audio if (_gameDescription->flags & ADGF_CD) - g_system->getAudioCDManager()->openCD(); + g_system->getAudioCDManager()->open(); setMusic(1); _mixer->playStream(Audio::Mixer::kMusicSoundType, &_musicHandle, music, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, false); diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp index 782dd7ae48..1b733a08ba 100644 --- a/engines/tinsel/tinsel.cpp +++ b/engines/tinsel/tinsel.cpp @@ -841,7 +841,7 @@ TinselEngine::TinselEngine(OSystem *syst, const TinselGameDescription *gameDesc) if (!scumm_stricmp(g->gameid, gameid)) _gameId = g->id; - _system->getAudioCDManager()->openCD(); + _system->getAudioCDManager()->open(); _mousePos.x = 0; _mousePos.y = 0; @@ -973,7 +973,7 @@ Common::Error TinselEngine::run() { // Check for time to do next game cycle if ((g_system->getMillis() > timerVal + GAME_FRAME_DELAY)) { timerVal = g_system->getMillis(); - _system->getAudioCDManager()->updateCD(); + _system->getAudioCDManager()->update(); NextGameCycle(); } -- cgit v1.2.3