aboutsummaryrefslogtreecommitdiff
path: root/engines/groovie/music.cpp
diff options
context:
space:
mode:
authorMax Horn2010-11-08 22:53:36 +0000
committerMax Horn2010-11-08 22:53:36 +0000
commit82e473bc3b1498325bad28d804e4314f0c3a528c (patch)
treef186d8b9eeb665a81897deca3a3fadcf74007c16 /engines/groovie/music.cpp
parent4242229c91c356bdd90c66ce8c0642488a1b4bf5 (diff)
parent74a53df11b51fa4956745c086b2e6351b8383568 (diff)
downloadscummvm-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/groovie/music.cpp')
-rw-r--r--engines/groovie/music.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp
index 6ccc68c498..2ad11ee0e6 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->getAudioCDManager()->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->getAudioCDManager()->stop();
return;
}
@@ -101,20 +100,20 @@ 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->getAudioCDManager()->updateCD();
+ while (g_system->getAudioCDManager()->isPlaying()) {
// Wait a bit and try again
_vm->_system->delayMillis(100);
- AudioCD.updateCD();
+ g_system->getAudioCDManager()->updateCD();
}
*/
// Play the track starting at the requested offset (1000ms = 75 frames)
- AudioCD.play(track - 1, 1, startms * 75 / 1000, 0);
+ g_system->getAudioCDManager()->play(track - 1, 1, startms * 75 / 1000, 0);
// If the audio is not playing from the CD, play the "fallback" MIDI.
// The Mac version has no CD tracks, so it will always use the MIDI.
- if (!AudioCD.isPlaying()) {
+ if (!g_system->getAudioCDManager()->isPlaying()) {
if (track == 2) {
// Intro MIDI fallback
if (_vm->getPlatform() == Common::kPlatformMacintosh)