aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorJohannes Schickel2016-04-06 23:35:41 +0200
committerJohannes Schickel2016-04-06 23:40:26 +0200
commit1cbab62211b24e265da0eff4c8e16c83b3e3953f (patch)
treec4d4cf656e4371106c60cc5dc24bd27e1fd24dce /backends
parentc412478a11bc715015a2a90c4fb15504bc883b8c (diff)
downloadscummvm-rg350-1cbab62211b24e265da0eff4c8e16c83b3e3953f.tar.gz
scummvm-rg350-1cbab62211b24e265da0eff4c8e16c83b3e3953f.tar.bz2
scummvm-rg350-1cbab62211b24e265da0eff4c8e16c83b3e3953f.zip
DC: Fix compilation errors due to AudioCD changes.
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/dc/dc.h2
-rw-r--r--backends/platform/dc/dcmain.cpp22
2 files changed, 16 insertions, 8 deletions
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h
index b567142b8f..6cd938ec9c 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -63,7 +63,7 @@ public:
bool isPlaying() const;
// Play cdrom audio track
- void play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate = false);
+ bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate = false);
// Stop cdrom audio track
void stop();
diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp
index bd66b81b35..c84aef9c47 100644
--- a/backends/platform/dc/dcmain.cpp
+++ b/backends/platform/dc/dcmain.cpp
@@ -90,12 +90,18 @@ static bool find_track(int track, int &first_sec, int &last_sec)
return false;
}
-void DCCDManager::play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate) {
+bool DCCDManager::play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate) {
DefaultAudioCDManager::play(track, numLoops, startFrame, duration, onlyEmulate);
- // If we're playing now, are set to only emulate, return here
- if (isPlaying() || onlyEmulate)
- return;
+ // If we're playing now return here
+ if (isPlaying()) {
+ return true;
+ }
+
+ // If we should only play emulated tracks stop here.
+ if (onlyEmulate) {
+ return false;
+ }
int firstSec, lastSec;
#if 1
@@ -106,16 +112,18 @@ void DCCDManager::play(int track, int numLoops, int startFrame, int duration, bo
if (numLoops > 14)
numLoops = 14;
else if (numLoops < 0)
- num_loops = 15; // infinity
+ numLoops = 15; // infinity
if (!find_track(track, firstSec, lastSec))
- return;
+ return false;
if (duration)
lastSec = firstSec + startFrame + duration;
- firstSec += startFrame;
+ firstSec += startFrame;
play_cdda_sectors(firstSec, lastSec, numLoops);
+
+ return true;
}
void DCCDManager::stop() {