Renamed getAudioCD to getAudioCDManager.
svn-id: r49678
This commit is contained in:
parent
6a52a168ee
commit
e1ef3cd9fc
24 changed files with 74 additions and 74 deletions
|
@ -87,7 +87,7 @@ Common::WriteStream *BaseBackend::createConfigWriteStream() {
|
|||
|
||||
static DefaultAudioCDManager *s_audiocdManager = 0;
|
||||
|
||||
AudioCDManager *BaseBackend::getAudioCD() {
|
||||
AudioCDManager *BaseBackend::getAudioCDManager() {
|
||||
if (!s_audiocdManager)
|
||||
s_audiocdManager = new DefaultAudioCDManager();
|
||||
return (AudioCDManager *)s_audiocdManager;
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
virtual Common::SeekableReadStream *createConfigReadStream();
|
||||
virtual Common::WriteStream *createConfigWriteStream();
|
||||
|
||||
virtual AudioCDManager *getAudioCD();
|
||||
virtual AudioCDManager *getAudioCDManager();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ Audio::Mixer *ModularBackend::getMixer() {
|
|||
return (Audio::Mixer *)_mixer;
|
||||
}
|
||||
|
||||
AudioCDManager *ModularBackend::getAudioCD() {
|
||||
AudioCDManager *ModularBackend::getAudioCDManager() {
|
||||
assert(_audiocdManager);
|
||||
return _audiocdManager;
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ public:
|
|||
|
||||
virtual Audio::Mixer *getMixer();
|
||||
|
||||
virtual AudioCDManager *getAudioCD();
|
||||
virtual AudioCDManager *getAudioCDManager();
|
||||
|
||||
virtual void quit() { exit(0); }
|
||||
virtual void setWindowCaption(const char *caption) {}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#include "graphics/pixelformat.h"
|
||||
|
||||
#include "backends/audiocd/abstract-audiocd.h"
|
||||
#include "backends/audiocd/audiocd.h"
|
||||
|
||||
namespace Audio {
|
||||
class Mixer;
|
||||
|
@ -935,7 +935,7 @@ public:
|
|||
* Return the audio cd manager. For more information, refer to the
|
||||
* AudioCDManager documentation.
|
||||
*/
|
||||
virtual AudioCDManager *getAudioCD() = 0;
|
||||
virtual AudioCDManager *getAudioCDManager() = 0;
|
||||
|
||||
//@}
|
||||
|
||||
|
|
|
@ -900,7 +900,7 @@ AGOSEngine::~AGOSEngine() {
|
|||
_midi.close();
|
||||
delete _driver;
|
||||
|
||||
_system->getAudioCD()->stop();
|
||||
_system->getAudioCDManager()->stop();
|
||||
|
||||
for (uint i = 0; i < _itemHeap.size(); i++) {
|
||||
delete[] _itemHeap[i];
|
||||
|
|
|
@ -427,7 +427,7 @@ void AGOSEngine::delay(uint amount) {
|
|||
uint32 cur = start;
|
||||
uint this_delay, vgaPeriod;
|
||||
|
||||
_system->getAudioCD()->updateCD();
|
||||
_system->getAudioCDManager()->updateCD();
|
||||
|
||||
if (_debugger->isAttached())
|
||||
_debugger->onFrame();
|
||||
|
@ -533,7 +533,7 @@ void AGOSEngine::delay(uint amount) {
|
|||
if (_leftButton == 1)
|
||||
_leftButtonCount++;
|
||||
|
||||
_system->getAudioCD()->updateCD();
|
||||
_system->getAudioCDManager()->updateCD();
|
||||
|
||||
_system->updateScreen();
|
||||
|
||||
|
|
|
@ -227,9 +227,9 @@ void AGOSEngine_Simon1::playMusic(uint16 music, uint16 track) {
|
|||
stopMusic();
|
||||
|
||||
// Support for compressed music from the ScummVM Music Enhancement Project
|
||||
_system->getAudioCD()->stop();
|
||||
_system->getAudioCD()->play(music + 1, -1, 0, 0);
|
||||
if (_system->getAudioCD()->isPlaying())
|
||||
_system->getAudioCDManager()->stop();
|
||||
_system->getAudioCDManager()->play(music + 1, -1, 0, 0);
|
||||
if (_system->getAudioCDManager()->isPlaying())
|
||||
return;
|
||||
|
||||
if (getPlatform() == Common::kPlatformAmiga) {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -243,7 +243,7 @@ Common::Error GobEngine::run() {
|
|||
|
||||
int cd_num = ConfMan.getInt("cdrom");
|
||||
if (cd_num >= 0)
|
||||
_system->getAudioCD()->openCD(cd_num);
|
||||
_system->getAudioCDManager()->openCD(cd_num);
|
||||
|
||||
_global->_debugFlag = 1;
|
||||
_video->_doRangeClamp = true;
|
||||
|
|
|
@ -115,7 +115,7 @@ void CDROM::play(uint32 from, uint32 to) {
|
|||
// HSG encodes frame information into a double word:
|
||||
// minute multiplied by 4500, plus second multiplied by 75,
|
||||
// plus frame, minus 150
|
||||
g_system->getAudioCD()->play(1, 1, from, to - from + 1);
|
||||
g_system->getAudioCDManager()->play(1, 1, from, to - from + 1);
|
||||
_cdPlaying = true;
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ void CDROM::stopPlaying() {
|
|||
|
||||
void CDROM::stop() {
|
||||
_curTrackBuffer = 0;
|
||||
g_system->getAudioCD()->stop();
|
||||
g_system->getAudioCDManager()->stop();
|
||||
_cdPlaying = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -217,7 +217,7 @@ Common::Error GroovieEngine::run() {
|
|||
// Initialize the CD
|
||||
int cd_num = ConfMan.getInt("cdrom");
|
||||
if (cd_num >= 0)
|
||||
_system->getAudioCD()->openCD(cd_num);
|
||||
_system->getAudioCDManager()->openCD(cd_num);
|
||||
|
||||
while (!shouldQuit()) {
|
||||
// Show the debugger if required
|
||||
|
|
|
@ -41,7 +41,7 @@ MusicPlayer::MusicPlayer(GroovieEngine *vm) :
|
|||
}
|
||||
|
||||
MusicPlayer::~MusicPlayer() {
|
||||
g_system->getAudioCD()->stop();
|
||||
g_system->getAudioCDManager()->stop();
|
||||
}
|
||||
|
||||
void MusicPlayer::playSong(uint32 fileref) {
|
||||
|
@ -89,7 +89,7 @@ void MusicPlayer::playCD(uint8 track) {
|
|||
// the song number (it's track 2 on the 2nd CD)
|
||||
} else if ((track == 98) && (_prevCDtrack == 3)) {
|
||||
// Track 98 is used as a hack to stop the credits song
|
||||
g_system->getAudioCD()->stop();
|
||||
g_system->getAudioCDManager()->stop();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -100,16 +100,16 @@ void MusicPlayer::playCD(uint8 track) {
|
|||
// It was in the original interpreter, but it introduces a big delay
|
||||
// in the middle of the introduction, so it's disabled right now
|
||||
/*
|
||||
g_system->getAudioCD()->updateCD();
|
||||
while (g_system->getAudioCD()->isPlaying()) {
|
||||
g_system->getAudioCDManager()->updateCD();
|
||||
while (g_system->getAudioCDManager()->isPlaying()) {
|
||||
// Wait a bit and try again
|
||||
_vm->_system->delayMillis(100);
|
||||
g_system->getAudioCD()->updateCD();
|
||||
g_system->getAudioCDManager()->updateCD();
|
||||
}
|
||||
*/
|
||||
|
||||
// Play the track starting at the requested offset (1000ms = 75 frames)
|
||||
g_system->getAudioCD()->play(track - 1, 1, startms * 75 / 1000, 0);
|
||||
g_system->getAudioCDManager()->play(track - 1, 1, startms * 75 / 1000, 0);
|
||||
}
|
||||
|
||||
void MusicPlayer::startBackground() {
|
||||
|
|
|
@ -3774,7 +3774,7 @@ SoundTowns::SoundTowns(KyraEngine_v1 *vm, Audio::Mixer *mixer)
|
|||
}
|
||||
|
||||
SoundTowns::~SoundTowns() {
|
||||
g_system->getAudioCD()->stop();
|
||||
g_system->getAudioCDManager()->stop();
|
||||
haltTrack();
|
||||
delete[] _sfxFileData;
|
||||
|
||||
|
@ -3795,7 +3795,7 @@ bool SoundTowns::init() {
|
|||
}
|
||||
|
||||
void SoundTowns::process() {
|
||||
g_system->getAudioCD()->updateCD();
|
||||
g_system->getAudioCDManager()->updateCD();
|
||||
}
|
||||
|
||||
void SoundTowns::playTrack(uint8 track) {
|
||||
|
@ -3815,8 +3815,8 @@ void SoundTowns::playTrack(uint8 track) {
|
|||
beginFadeOut();
|
||||
|
||||
if (_musicEnabled == 2 && trackNum != -1) {
|
||||
g_system->getAudioCD()->play(trackNum+1, loop ? -1 : 1, 0, 0);
|
||||
g_system->getAudioCD()->updateCD();
|
||||
g_system->getAudioCDManager()->play(trackNum+1, loop ? -1 : 1, 0, 0);
|
||||
g_system->getAudioCDManager()->updateCD();
|
||||
} else if (_musicEnabled) {
|
||||
playEuphonyTrack(READ_LE_UINT32(&tTable[tTableIndex]), loop);
|
||||
}
|
||||
|
@ -3826,8 +3826,8 @@ void SoundTowns::playTrack(uint8 track) {
|
|||
|
||||
void SoundTowns::haltTrack() {
|
||||
_lastTrack = -1;
|
||||
g_system->getAudioCD()->stop();
|
||||
g_system->getAudioCD()->updateCD();
|
||||
g_system->getAudioCDManager()->stop();
|
||||
g_system->getAudioCDManager()->updateCD();
|
||||
if (_parser) {
|
||||
Common::StackLock lock(_mutex);
|
||||
_parser->setTrack(0);
|
||||
|
@ -3935,8 +3935,8 @@ void SoundTowns::beginFadeOut() {
|
|||
_driver->fading();
|
||||
|
||||
// TODO: this should fade out too
|
||||
g_system->getAudioCD()->stop();
|
||||
g_system->getAudioCD()->updateCD();
|
||||
g_system->getAudioCDManager()->stop();
|
||||
g_system->getAudioCDManager()->updateCD();
|
||||
}
|
||||
|
||||
int SoundTowns::open() {
|
||||
|
@ -4098,8 +4098,8 @@ void SoundPC98::playTrack(uint8 track) {
|
|||
|
||||
void SoundPC98::haltTrack() {
|
||||
_lastTrack = -1;
|
||||
g_system->getAudioCD()->stop();
|
||||
g_system->getAudioCD()->updateCD();
|
||||
g_system->getAudioCDManager()->stop();
|
||||
g_system->getAudioCDManager()->updateCD();
|
||||
_driver->reset();
|
||||
}
|
||||
|
||||
|
@ -4168,7 +4168,7 @@ void SoundTownsPC98_v2::loadSoundFile(Common::String file) {
|
|||
}
|
||||
|
||||
void SoundTownsPC98_v2::process() {
|
||||
g_system->getAudioCD()->updateCD();
|
||||
g_system->getAudioCDManager()->updateCD();
|
||||
}
|
||||
|
||||
void SoundTownsPC98_v2::playTrack(uint8 track) {
|
||||
|
@ -4205,8 +4205,8 @@ void SoundTownsPC98_v2::playTrack(uint8 track) {
|
|||
_driver->loadMusicData(_musicTrackData, true);
|
||||
|
||||
if (_musicEnabled == 2 && trackNum != -1) {
|
||||
g_system->getAudioCD()->play(trackNum+1, _driver->looping() ? -1 : 1, 0, 0);
|
||||
g_system->getAudioCD()->updateCD();
|
||||
g_system->getAudioCDManager()->play(trackNum+1, _driver->looping() ? -1 : 1, 0, 0);
|
||||
g_system->getAudioCDManager()->updateCD();
|
||||
} else if (_musicEnabled) {
|
||||
_driver->cont();
|
||||
}
|
||||
|
@ -4216,8 +4216,8 @@ void SoundTownsPC98_v2::playTrack(uint8 track) {
|
|||
|
||||
void SoundTownsPC98_v2::haltTrack() {
|
||||
_lastTrack = -1;
|
||||
g_system->getAudioCD()->stop();
|
||||
g_system->getAudioCD()->updateCD();
|
||||
g_system->getAudioCDManager()->stop();
|
||||
g_system->getAudioCDManager()->updateCD();
|
||||
_driver->reset();
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng
|
|||
|
||||
int cd_num = ConfMan.getInt("cdrom");
|
||||
if (cd_num >= 0)
|
||||
_system->getAudioCD()->openCD(cd_num);
|
||||
_system->getAudioCDManager()->openCD(cd_num);
|
||||
|
||||
_pmvPlayer = new PmvPlayer(this, _mixer);
|
||||
_res = new ResourceReader();
|
||||
|
@ -128,7 +128,7 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng
|
|||
}
|
||||
|
||||
MadeEngine::~MadeEngine() {
|
||||
_system->getAudioCD()->stop();
|
||||
_system->getAudioCDManager()->stop();
|
||||
|
||||
delete _rnd;
|
||||
delete _pmvPlayer;
|
||||
|
@ -240,7 +240,7 @@ void MadeEngine::handleEvents() {
|
|||
}
|
||||
}
|
||||
|
||||
_system->getAudioCD()->updateCD();
|
||||
_system->getAudioCDManager()->updateCD();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -594,9 +594,9 @@ int16 ScriptFunctions::sfPlayVoice(int16 argc, int16 *argv) {
|
|||
}
|
||||
|
||||
int16 ScriptFunctions::sfPlayCd(int16 argc, int16 *argv) {
|
||||
g_system->getAudioCD()->play(argv[0] - 1, 1, 0, 0);
|
||||
g_system->getAudioCDManager()->play(argv[0] - 1, 1, 0, 0);
|
||||
_vm->_cdTimeStart = _vm->_system->getMillis();
|
||||
if (g_system->getAudioCD()->isPlaying()) {
|
||||
if (g_system->getAudioCDManager()->isPlaying()) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -604,8 +604,8 @@ int16 ScriptFunctions::sfPlayCd(int16 argc, int16 *argv) {
|
|||
}
|
||||
|
||||
int16 ScriptFunctions::sfStopCd(int16 argc, int16 *argv) {
|
||||
if (g_system->getAudioCD()->isPlaying()) {
|
||||
g_system->getAudioCD()->stop();
|
||||
if (g_system->getAudioCDManager()->isPlaying()) {
|
||||
g_system->getAudioCDManager()->stop();
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -613,11 +613,11 @@ int16 ScriptFunctions::sfStopCd(int16 argc, int16 *argv) {
|
|||
}
|
||||
|
||||
int16 ScriptFunctions::sfGetCdStatus(int16 argc, int16 *argv) {
|
||||
return g_system->getAudioCD()->isPlaying() ? 1 : 0;
|
||||
return g_system->getAudioCDManager()->isPlaying() ? 1 : 0;
|
||||
}
|
||||
|
||||
int16 ScriptFunctions::sfGetCdTime(int16 argc, int16 *argv) {
|
||||
if (g_system->getAudioCD()->isPlaying()) {
|
||||
if (g_system->getAudioCDManager()->isPlaying()) {
|
||||
uint32 deltaTime = _vm->_system->getMillis() - _vm->_cdTimeStart;
|
||||
// This basically converts the time from milliseconds to MSF format to MADE's format
|
||||
return (deltaTime / 1000 * 30) + (deltaTime % 1000 / 75 * 30 / 75);
|
||||
|
|
|
@ -374,7 +374,7 @@ int AudioPlayer::audioCdPlay(int track, int start, int duration) {
|
|||
|
||||
// Subtract one from track. KQ6 starts at track 1, while ScummVM
|
||||
// ignores the data track and considers track 2 to be track 1.
|
||||
g_system->getAudioCD()->play(track - 1, 1, start, duration);
|
||||
g_system->getAudioCDManager()->play(track - 1, 1, start, duration);
|
||||
return 1;
|
||||
} else {
|
||||
// Jones in the Fast Lane CD Audio format
|
||||
|
@ -397,7 +397,7 @@ int AudioPlayer::audioCdPlay(int track, int start, int duration) {
|
|||
|
||||
// Jones uses the track as the resource value in the map
|
||||
if (res == track) {
|
||||
g_system->getAudioCD()->play(1, 1, startFrame, length);
|
||||
g_system->getAudioCDManager()->play(1, 1, startFrame, length);
|
||||
_audioCdStart = g_system->getMillis();
|
||||
break;
|
||||
}
|
||||
|
@ -411,16 +411,16 @@ int AudioPlayer::audioCdPlay(int track, int start, int duration) {
|
|||
|
||||
void AudioPlayer::audioCdStop() {
|
||||
_audioCdStart = 0;
|
||||
g_system->getAudioCD()->stop();
|
||||
g_system->getAudioCDManager()->stop();
|
||||
}
|
||||
|
||||
void AudioPlayer::audioCdUpdate() {
|
||||
g_system->getAudioCD()->update();
|
||||
g_system->getAudioCDManager()->update();
|
||||
}
|
||||
|
||||
int AudioPlayer::audioCdPosition() {
|
||||
// Return -1 if the sample is done playing. Converting to frames to compare.
|
||||
if (((g_system->getMillis() - _audioCdStart) * 75 / 1000) >= (uint32)g_system->getAudioCD()->getStatus().duration)
|
||||
if (((g_system->getMillis() - _audioCdStart) * 75 / 1000) >= (uint32)g_system->getAudioCDManager()->getStatus().duration)
|
||||
return -1;
|
||||
|
||||
// Return the position otherwise (in ticks).
|
||||
|
|
|
@ -1372,13 +1372,13 @@ void ScummEngine::saveOrLoad(Serializer *s) {
|
|||
if (s->getVersion() >= VER(24)) {
|
||||
AudioCDManager::Status info;
|
||||
if (s->isSaving())
|
||||
info = _system->getAudioCD()->getStatus();
|
||||
info = _system->getAudioCDManager()->getStatus();
|
||||
s->saveLoadArrayOf(&info, 1, sizeof(info), audioCDEntries);
|
||||
// If we are loading, and the music being loaded was supposed to loop
|
||||
// forever, then resume playing it. This helps a lot when the audio CD
|
||||
// is used to provide ambient music (see bug #788195).
|
||||
if (s->isLoading() && info.playing && info.numLoops < 0)
|
||||
_system->getAudioCD()->play(info.track, info.numLoops, info.start, info.duration);
|
||||
_system->getAudioCDManager()->play(info.track, info.numLoops, info.start, info.duration);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1149,7 +1149,7 @@ void ScummEngine::setupScumm() {
|
|||
|
||||
int cd_num = ConfMan.getInt("cdrom");
|
||||
if (cd_num >= 0)
|
||||
_system->getAudioCD()->openCD(cd_num);
|
||||
_system->getAudioCDManager()->openCD(cd_num);
|
||||
}
|
||||
|
||||
// Create the sound manager
|
||||
|
|
|
@ -86,7 +86,7 @@ Sound::Sound(ScummEngine *parent, Audio::Mixer *mixer)
|
|||
|
||||
Sound::~Sound() {
|
||||
stopCDTimer();
|
||||
g_system->getAudioCD()->stop();
|
||||
g_system->getAudioCDManager()->stop();
|
||||
delete _sfxFile;
|
||||
}
|
||||
|
||||
|
@ -1068,7 +1068,7 @@ void Sound::playCDTrack(int track, int numLoops, int startFrame, int duration) {
|
|||
|
||||
// Play it
|
||||
if (!_soundsPaused)
|
||||
g_system->getAudioCD()->play(track, numLoops, startFrame, duration);
|
||||
g_system->getAudioCDManager()->play(track, numLoops, startFrame, duration);
|
||||
|
||||
// Start the timer after starting the track. Starting an MP3 track is
|
||||
// almost instantaneous, but a CD player may take some time. Hopefully
|
||||
|
@ -1077,15 +1077,15 @@ void Sound::playCDTrack(int track, int numLoops, int startFrame, int duration) {
|
|||
}
|
||||
|
||||
void Sound::stopCD() {
|
||||
g_system->getAudioCD()->stop();
|
||||
g_system->getAudioCDManager()->stop();
|
||||
}
|
||||
|
||||
int Sound::pollCD() const {
|
||||
return g_system->getAudioCD()->isPlaying();
|
||||
return g_system->getAudioCDManager()->isPlaying();
|
||||
}
|
||||
|
||||
void Sound::updateCD() {
|
||||
g_system->getAudioCD()->updateCD();
|
||||
g_system->getAudioCDManager()->updateCD();
|
||||
}
|
||||
|
||||
void Sound::saveLoadWithSerializer(Serializer *ser) {
|
||||
|
|
|
@ -984,7 +984,7 @@ void TeenAgentEngine::setMusic(byte id) {
|
|||
}
|
||||
byte track = track2cd[id - 1];
|
||||
debug(0, "playing cd track %u", track);
|
||||
_system->getAudioCD()->play(track, -1, 0, 0);
|
||||
_system->getAudioCDManager()->play(track, -1, 0, 0);
|
||||
} else if (music->load(id))
|
||||
music->start();
|
||||
}
|
||||
|
|
|
@ -211,11 +211,11 @@ bool PlayMidiSequence(uint32 dwFileOffset, bool bLoop) {
|
|||
currentLoop = bLoop;
|
||||
|
||||
// try to play track, but don't fall back to a true CD
|
||||
g_system->getAudioCD()->play(track, bLoop ? -1 : 1, 0, 0, true);
|
||||
g_system->getAudioCDManager()->play(track, bLoop ? -1 : 1, 0, 0, true);
|
||||
|
||||
// Check if an enhanced audio track is being played.
|
||||
// If it is, stop here and don't load a MIDI track
|
||||
if (g_system->getAudioCD()->isPlaying()) {
|
||||
if (g_system->getAudioCDManager()->isPlaying()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ bool PlayMidiSequence(uint32 dwFileOffset, bool bLoop) {
|
|||
*/
|
||||
bool MidiPlaying() {
|
||||
if (_vm->getFeatures() & GF_ENHANCED_AUDIO_SUPPORT) {
|
||||
if (g_system->getAudioCD()->isPlaying())
|
||||
if (g_system->getAudioCDManager()->isPlaying())
|
||||
return true;
|
||||
}
|
||||
return _vm->_midiMusic->isPlaying();
|
||||
|
@ -304,7 +304,7 @@ bool StopMidi() {
|
|||
currentLoop = false;
|
||||
|
||||
if (_vm->getFeatures() & GF_ENHANCED_AUDIO_SUPPORT) {
|
||||
g_system->getAudioCD()->stop();
|
||||
g_system->getAudioCDManager()->stop();
|
||||
}
|
||||
|
||||
_vm->_midiMusic->stop();
|
||||
|
|
|
@ -853,7 +853,7 @@ TinselEngine::TinselEngine(OSystem *syst, const TinselGameDescription *gameDesc)
|
|||
|
||||
int cd_num = ConfMan.getInt("cdrom");
|
||||
if (cd_num >= 0)
|
||||
_system->getAudioCD()->openCD(cd_num);
|
||||
_system->getAudioCDManager()->openCD(cd_num);
|
||||
|
||||
MidiDriverType midiDriver = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB | MDT_PREFER_MIDI);
|
||||
bool native_mt32 = ((midiDriver == MD_MT32) || ConfMan.getBool("native_mt32"));
|
||||
|
@ -884,7 +884,7 @@ TinselEngine::~TinselEngine() {
|
|||
if (_bmv->MoviePlaying())
|
||||
_bmv->FinishBMV();
|
||||
|
||||
_system->getAudioCD()->stop();
|
||||
_system->getAudioCDManager()->stop();
|
||||
delete _bmv;
|
||||
delete _sound;
|
||||
delete _midiMusic;
|
||||
|
@ -1006,7 +1006,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->getAudioCD()->updateCD();
|
||||
_system->getAudioCDManager()->updateCD();
|
||||
NextGameCycle();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue