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/tinsel/music.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'engines/tinsel/music.cpp') diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp index cef7f0a781..0dd62dc9c4 100644 --- a/engines/tinsel/music.cpp +++ b/engines/tinsel/music.cpp @@ -30,7 +30,6 @@ #include "sound/audiostream.h" #include "sound/mididrv.h" #include "sound/midiparser.h" -#include "sound/audiocd.h" #include "sound/decoders/adpcm.h" #include "common/config-manager.h" #include "common/file.h" @@ -212,11 +211,11 @@ bool PlayMidiSequence(uint32 dwFileOffset, bool bLoop) { currentLoop = bLoop; // try to play track, but don't fall back to a true CD - AudioCD.play(track, bLoop ? -1 : 1, 0, 0, true); + g_system->getAudioCD()->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 (AudioCD.isPlaying()) { + if (g_system->getAudioCD()->isPlaying()) { return true; } } @@ -291,7 +290,7 @@ bool PlayMidiSequence(uint32 dwFileOffset, bool bLoop) { */ bool MidiPlaying() { if (_vm->getFeatures() & GF_ENHANCED_AUDIO_SUPPORT) { - if (AudioCD.isPlaying()) + if (g_system->getAudioCD()->isPlaying()) return true; } return _vm->_midiMusic->isPlaying(); @@ -305,7 +304,7 @@ bool StopMidi() { currentLoop = false; if (_vm->getFeatures() & GF_ENHANCED_AUDIO_SUPPORT) { - AudioCD.stop(); + g_system->getAudioCD()->stop(); } _vm->_midiMusic->stop(); -- 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/tinsel/music.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/tinsel/music.cpp') diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp index 0dd62dc9c4..cb246bc8b3 100644 --- a/engines/tinsel/music.cpp +++ b/engines/tinsel/music.cpp @@ -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(); -- cgit v1.2.3