aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
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/scumm
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/scumm')
-rw-r--r--engines/scumm/he/sound_he.cpp1
-rw-r--r--engines/scumm/saveload.cpp9
-rw-r--r--engines/scumm/scumm.cpp2
-rw-r--r--engines/scumm/sound.cpp11
4 files changed, 10 insertions, 13 deletions
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index 318cb818b6..1d02a95b30 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -36,7 +36,6 @@
#include "common/util.h"
#include "sound/decoders/adpcm.h"
-#include "sound/audiocd.h"
#include "sound/decoders/flac.h"
#include "sound/mididrv.h"
#include "sound/mixer.h"
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 9cb603e27f..58bb817292 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -43,7 +43,6 @@
#include "scumm/he/sprite_he.h"
#include "scumm/verbs.h"
-#include "sound/audiocd.h"
#include "sound/mixer.h"
#include "graphics/thumbnail.h"
@@ -1107,7 +1106,7 @@ void ScummEngine::saveOrLoad(Serializer *s) {
// as AudioCDManager::Status::playing, and MSVC6 has
// a fit with that. This typedef simplifies the notation
// to something MSVC6 can grasp.
- typedef Audio::AudioCDManager::Status AudioCDManager_Status;
+ typedef AudioCDManager::Status AudioCDManager_Status;
const SaveLoadEntry audioCDEntries[] = {
MKLINE(AudioCDManager_Status, playing, sleUint32, VER(24)),
MKLINE(AudioCDManager_Status, track, sleInt32, VER(24)),
@@ -1408,15 +1407,15 @@ void ScummEngine::saveOrLoad(Serializer *s) {
// Save/load the Audio CD status
//
if (s->getVersion() >= VER(24)) {
- Audio::AudioCDManager::Status info;
+ AudioCDManager::Status info;
if (s->isSaving())
- info = AudioCD.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)
- AudioCD.play(info.track, info.numLoops, info.start, info.duration);
+ _system->getAudioCDManager()->play(info.track, info.numLoops, info.start, info.duration);
}
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 405c81f91b..392b3ca3c4 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1200,7 +1200,7 @@ void ScummEngine::setupScumm() {
int cd_num = ConfMan.getInt("cdrom");
if (cd_num >= 0)
- _system->openCD(cd_num);
+ _system->getAudioCDManager()->openCD(cd_num);
}
// Create the sound manager
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 8fc6de8af9..af7bc5f295 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -37,7 +37,6 @@
#include "scumm/util.h"
#include "sound/decoders/adpcm.h"
-#include "sound/audiocd.h"
#include "sound/decoders/flac.h"
#include "sound/mididrv.h"
#include "sound/mixer.h"
@@ -89,7 +88,7 @@ Sound::Sound(ScummEngine *parent, Audio::Mixer *mixer)
Sound::~Sound() {
stopCDTimer();
- AudioCD.stop();
+ g_system->getAudioCDManager()->stop();
delete _sfxFile;
}
@@ -1027,7 +1026,7 @@ void Sound::playCDTrack(int track, int numLoops, int startFrame, int duration) {
// Play it
if (!_soundsPaused)
- AudioCD.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
@@ -1036,15 +1035,15 @@ void Sound::playCDTrack(int track, int numLoops, int startFrame, int duration) {
}
void Sound::stopCD() {
- AudioCD.stop();
+ g_system->getAudioCDManager()->stop();
}
int Sound::pollCD() const {
- return AudioCD.isPlaying();
+ return g_system->getAudioCDManager()->isPlaying();
}
void Sound::updateCD() {
- AudioCD.updateCD();
+ g_system->getAudioCDManager()->updateCD();
}
void Sound::saveLoadWithSerializer(Serializer *ser) {