diff options
Diffstat (limited to 'engines/kyra/sound_towns.cpp')
-rw-r--r-- | engines/kyra/sound_towns.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index a674f9efb8..487f5e8128 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -30,7 +30,6 @@ #include "kyra/sound_intern.h" #include "kyra/screen.h" -#include "sound/audiocd.h" #include "sound/audiostream.h" #include "sound/decoders/raw.h" @@ -46,7 +45,7 @@ SoundTowns::SoundTowns(KyraEngine_v1 *vm, Audio::Mixer *mixer) } SoundTowns::~SoundTowns() { - AudioCD.stop(); + g_system->getAudioCDManager()->stop(); haltTrack(); delete _driver; delete[] _musicTrackData; @@ -75,7 +74,7 @@ bool SoundTowns::init() { } void SoundTowns::process() { - AudioCD.updateCD(); + g_system->getAudioCDManager()->updateCD(); } void SoundTowns::playTrack(uint8 track) { @@ -83,7 +82,7 @@ void SoundTowns::playTrack(uint8 track) { return; track -= 2; - const int32 * const tTable = (const int32 *)cdaData(); + const int32 *const tTable = (const int32 *const)cdaData(); int tTableIndex = 3 * track; int trackNum = (int)READ_LE_UINT32(&tTable[tTableIndex + 2]); @@ -96,8 +95,8 @@ void SoundTowns::playTrack(uint8 track) { if (_musicEnabled == 2 && trackNum != -1) { _driver->setOutputVolume(1, 118, 118); - AudioCD.play(trackNum+1, loop ? -1 : 1, 0, 0); - AudioCD.updateCD(); + g_system->getAudioCDManager()->play(trackNum + 1, loop ? -1 : 1, 0, 0); + g_system->getAudioCDManager()->updateCD(); _cdaPlaying = true; } else if (_musicEnabled) { playEuphonyTrack(READ_LE_UINT32(&tTable[tTableIndex]), loop); @@ -109,8 +108,8 @@ void SoundTowns::playTrack(uint8 track) { void SoundTowns::haltTrack() { _lastTrack = -1; - AudioCD.stop(); - AudioCD.updateCD(); + g_system->getAudioCDManager()->stop(); + g_system->getAudioCDManager()->updateCD(); _cdaPlaying = false; for (int i = 0; i < 6; i++) @@ -437,8 +436,8 @@ void SoundPC98::playTrack(uint8 track) { void SoundPC98::haltTrack() { _lastTrack = -1; - AudioCD.stop(); - AudioCD.updateCD(); + g_system->getAudioCDManager()->stop(); + g_system->getAudioCDManager()->updateCD(); _driver->reset(); } @@ -521,7 +520,7 @@ void SoundTownsPC98_v2::loadSoundFile(Common::String file) { } void SoundTownsPC98_v2::process() { - AudioCD.updateCD(); + g_system->getAudioCDManager()->updateCD(); } void SoundTownsPC98_v2::playTrack(uint8 track) { @@ -530,7 +529,7 @@ void SoundTownsPC98_v2::playTrack(uint8 track) { if (track == _lastTrack && _musicEnabled) return; - const uint16 * const cdaTracks = (const uint16 *)cdaData(); + const uint16 *const cdaTracks = (const uint16 *const) cdaData(); int trackNum = -1; if (_vm->gameFlags().platform == Common::kPlatformFMTowns) { @@ -558,8 +557,8 @@ void SoundTownsPC98_v2::playTrack(uint8 track) { _driver->loadMusicData(_musicTrackData, true); if (_musicEnabled == 2 && trackNum != -1) { - AudioCD.play(trackNum+1, _driver->looping() ? -1 : 1, 0, 0); - AudioCD.updateCD(); + g_system->getAudioCDManager()->play(trackNum+1, _driver->looping() ? -1 : 1, 0, 0); + g_system->getAudioCDManager()->updateCD(); } else if (_musicEnabled) { _driver->cont(); } @@ -569,8 +568,8 @@ void SoundTownsPC98_v2::playTrack(uint8 track) { void SoundTownsPC98_v2::haltTrack() { _lastTrack = -1; - AudioCD.stop(); - AudioCD.updateCD(); + g_system->getAudioCDManager()->stop(); + g_system->getAudioCDManager()->updateCD(); _driver->reset(); } |