diff options
author | Alejandro Marzini | 2010-06-09 20:09:57 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-06-09 20:09:57 +0000 |
commit | e991cd8c53ad21af037df1e0a16816aeea2d0fe2 (patch) | |
tree | f647f636fc3898c150db61de50c3522056a65d17 /engines/groovie | |
parent | 4177a1e16df7712c081e41a8eabf0b7d4694230b (diff) | |
download | scummvm-rg350-e991cd8c53ad21af037df1e0a16816aeea2d0fe2.tar.gz scummvm-rg350-e991cd8c53ad21af037df1e0a16816aeea2d0fe2.tar.bz2 scummvm-rg350-e991cd8c53ad21af037df1e0a16816aeea2d0fe2.zip |
- 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
Diffstat (limited to 'engines/groovie')
-rw-r--r-- | engines/groovie/groovie.cpp | 2 | ||||
-rw-r--r-- | engines/groovie/music.cpp | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index e0760e1d41..8c78791630 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -217,7 +217,7 @@ Common::Error GroovieEngine::run() { // Initialize the CD int cd_num = ConfMan.getInt("cdrom"); if (cd_num >= 0) - _system->openCD(cd_num); + _system->getAudioCD()->openCD(cd_num); while (!shouldQuit()) { // Show the debugger if required diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp index 2ea7454256..4e0a97aabb 100644 --- a/engines/groovie/music.cpp +++ b/engines/groovie/music.cpp @@ -29,7 +29,6 @@ #include "common/config-manager.h" #include "common/macresman.h" -#include "sound/audiocd.h" #include "sound/midiparser.h" namespace Groovie { @@ -42,7 +41,7 @@ MusicPlayer::MusicPlayer(GroovieEngine *vm) : } MusicPlayer::~MusicPlayer() { - AudioCD.stop(); + g_system->getAudioCD()->stop(); } void MusicPlayer::playSong(uint32 fileref) { @@ -90,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 - AudioCD.stop(); + g_system->getAudioCD()->stop(); return; } @@ -101,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 /* - AudioCD.updateCD(); - while (AudioCD.isPlaying()) { + g_system->getAudioCD()->updateCD(); + while (g_system->getAudioCD()->isPlaying()) { // Wait a bit and try again _vm->_system->delayMillis(100); - AudioCD.updateCD(); + g_system->getAudioCD()->updateCD(); } */ // Play the track starting at the requested offset (1000ms = 75 frames) - AudioCD.play(track - 1, 1, startms * 75 / 1000, 0); + g_system->getAudioCD()->play(track - 1, 1, startms * 75 / 1000, 0); } void MusicPlayer::startBackground() { |