diff options
author | Bastien Bouclet | 2018-07-31 21:41:10 +0200 |
---|---|---|
committer | Bastien Bouclet | 2018-07-31 21:44:26 +0200 |
commit | de886a8b5852248898ff86088dc867cf12a7e245 (patch) | |
tree | 2beec1457e3b487f854e7dfd9d67cd96bf6678e7 /backends/audiocd/linux | |
parent | 2586ca2345751a0ca5eb2c694e5e2c753054f069 (diff) | |
download | scummvm-rg350-de886a8b5852248898ff86088dc867cf12a7e245.tar.gz scummvm-rg350-de886a8b5852248898ff86088dc867cf12a7e245.tar.bz2 scummvm-rg350-de886a8b5852248898ff86088dc867cf12a7e245.zip |
AUDIO: Fix broken physical audio CD playback on non-win32
The play method did not override the base class due to the addition of
the soundType parameter.
Diffstat (limited to 'backends/audiocd/linux')
-rw-r--r-- | backends/audiocd/linux/linux-audiocd.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/backends/audiocd/linux/linux-audiocd.cpp b/backends/audiocd/linux/linux-audiocd.cpp index eb311569e9..a985662b37 100644 --- a/backends/audiocd/linux/linux-audiocd.cpp +++ b/backends/audiocd/linux/linux-audiocd.cpp @@ -178,13 +178,14 @@ public: LinuxAudioCDManager(); ~LinuxAudioCDManager(); - bool open(); - void close(); - bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate = false); + bool open() override; + void close() override; + bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate, + Audio::Mixer::SoundType soundType) override; protected: - bool openCD(int drive); - bool openCD(const Common::String &drive); + bool openCD(int drive) override; + bool openCD(const Common::String &drive) override; private: struct Device { @@ -285,9 +286,10 @@ bool LinuxAudioCDManager::openCD(const Common::String &drive) { return true; } -bool LinuxAudioCDManager::play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate) { +bool LinuxAudioCDManager::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)) + if (DefaultAudioCDManager::play(track, numLoops, startFrame, duration, onlyEmulate, soundType)) return true; // If we're set to only emulate, or have no CD drive, return here @@ -320,7 +322,7 @@ bool LinuxAudioCDManager::play(int track, int numLoops, int startFrame, int dura _emulating = true; _mixer->playStream( - Audio::Mixer::kMusicSoundType, + soundType, &_handle, Audio::makeLoopingAudioStream(audioStream, start, end, (numLoops < 1) ? numLoops + 1 : numLoops), -1, |