diff options
| author | Max Horn | 2010-11-08 22:53:36 +0000 |
|---|---|---|
| committer | Max Horn | 2010-11-08 22:53:36 +0000 |
| commit | 82e473bc3b1498325bad28d804e4314f0c3a528c (patch) | |
| tree | f186d8b9eeb665a81897deca3a3fadcf74007c16 /engines/kyra | |
| parent | 4242229c91c356bdd90c66ce8c0642488a1b4bf5 (diff) | |
| parent | 74a53df11b51fa4956745c086b2e6351b8383568 (diff) | |
| download | scummvm-rg350-82e473bc3b1498325bad28d804e4314f0c3a528c.tar.gz scummvm-rg350-82e473bc3b1498325bad28d804e4314f0c3a528c.tar.bz2 scummvm-rg350-82e473bc3b1498325bad28d804e4314f0c3a528c.zip | |
BACKENDS: Partial merge of gsoc2010-opengl: Audio CD changes only
This commit contains the AudioCDManager changes from the gsoc2010-opengl
branch. The other changes in that branch are restricted to the backends
directory only (plus configure).
The Nintendo DS and Dreamcast ports still need to be ported over to
the new Audio CD system, but that should be fairly easy to do.
svn-id: r54147
Diffstat (limited to 'engines/kyra')
| -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(); } |
