aboutsummaryrefslogtreecommitdiff
path: root/backends/audiocd/default/default-audiocd.h
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2016-07-21 13:30:47 +0200
committerWillem Jan Palenstijn2016-07-21 13:30:47 +0200
commit6f001d831623a46f643379554d20e94463d8c2f1 (patch)
tree901caa296592814b48a98ac2e3d381331c5a7821 /backends/audiocd/default/default-audiocd.h
parent75fdd1504de98c7c6937344877685bfef6514344 (diff)
parent5f301b24002fffb3e8e05061a92ae2e0ee3a92ec (diff)
downloadscummvm-rg350-6f001d831623a46f643379554d20e94463d8c2f1.tar.gz
scummvm-rg350-6f001d831623a46f643379554d20e94463d8c2f1.tar.bz2
scummvm-rg350-6f001d831623a46f643379554d20e94463d8c2f1.zip
Merge branch 'master' into titanic
Diffstat (limited to 'backends/audiocd/default/default-audiocd.h')
-rw-r--r--backends/audiocd/default/default-audiocd.h45
1 files changed, 32 insertions, 13 deletions
diff --git a/backends/audiocd/default/default-audiocd.h b/backends/audiocd/default/default-audiocd.h
index 9e4ba6b33e..e3fbb4b5a1 100644
--- a/backends/audiocd/default/default-audiocd.h
+++ b/backends/audiocd/default/default-audiocd.h
@@ -26,29 +26,48 @@
#include "backends/audiocd/audiocd.h"
#include "audio/mixer.h"
+namespace Common {
+class String;
+} // End of namespace Common
+
/**
* The default audio cd manager. Implements emulation of audio cd playback.
*/
class DefaultAudioCDManager : public AudioCDManager {
public:
DefaultAudioCDManager();
- virtual ~DefaultAudioCDManager() {}
-
- void play(int track, int numLoops, int startFrame, int duration, bool only_emulate = false);
- void stop();
- bool isPlaying() const;
- void setVolume(byte volume);
- void setBalance(int8 balance);
- void update();
+ virtual ~DefaultAudioCDManager();
+
+ virtual bool open();
+ virtual void close();
+ virtual bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate = false);
+ virtual void stop();
+ virtual bool isPlaying() const;
+ virtual void setVolume(byte volume);
+ virtual void setBalance(int8 balance);
+ virtual void update();
virtual Status getStatus() const; // Subclasses should override for better status results
+protected:
+ /**
+ * Open a CD using the cdrom config variable
+ */
+ bool openRealCD();
+
+ /**
+ * Open a CD using the specified drive index
+ * @param drive The index of the drive
+ * @note The index is implementation-defined, but 0 is always the best choice
+ */
virtual bool openCD(int drive) { return false; }
- virtual void updateCD() {}
- virtual bool pollCD() const { return false; }
- virtual void playCD(int track, int num_loops, int start_frame, int duration) {}
- virtual void stopCD() {}
-protected:
+ /**
+ * Open a CD from a specific drive
+ * @param drive The name of the drive/path
+ * @note The drive parameter is platform-specific
+ */
+ virtual bool openCD(const Common::String &drive) { return false; }
+
Audio::SoundHandle _handle;
bool _emulating;