[Scummvm-git-logs] scummvm master -> a404921a7e9021b7e18406f69399ef7333149bf3
criezy
criezy at scummvm.org
Sun Apr 26 01:19:51 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a404921a7e DC: Fix broken physical audio CD playback
Commit: a404921a7e9021b7e18406f69399ef7333149bf3
https://github.com/scummvm/scummvm/commit/a404921a7e9021b7e18406f69399ef7333149bf3
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2020-04-26T02:19:47+01:00
Commit Message:
DC: Fix broken physical audio CD playback
Changed paths:
backends/platform/dc/dc.h
backends/platform/dc/dcmain.cpp
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h
index ef47449365..d839aa7088 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -60,13 +60,14 @@ class DCCDManager : public DefaultAudioCDManager {
public:
// Poll cdrom status
// Returns true if cd audio is playing
- bool isPlaying() const;
+ bool isPlaying() const override;
// Play cdrom audio track
- bool 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,
+ Audio::Mixer::SoundType soundType) override;
// Stop cdrom audio track
- void stop();
+ void stop() override;
};
class OSystem_Dreamcast : private DCHardware, public EventsBaseBackend, public PaletteManager, public FilesystemFactory
diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp
index c74646c729..81bd4db41b 100644
--- a/backends/platform/dc/dcmain.cpp
+++ b/backends/platform/dc/dcmain.cpp
@@ -90,8 +90,11 @@ static bool find_track(int track, int &first_sec, int &last_sec)
return false;
}
-bool DCCDManager::play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate) {
- DefaultAudioCDManager::play(track, numLoops, startFrame, duration, onlyEmulate);
+bool DCCDManager::play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate,
+ Audio::Mixer::SoundType soundType) {
+ // Prefer emulation
+ if (DefaultAudioCDManager::play(track, numLoops, startFrame, duration, onlyEmulate, soundType))
+ return true;
// If we're playing now return here
if (isPlaying()) {
More information about the Scummvm-git-logs
mailing list