ScummVM API documentation
default-audiocd.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef BACKENDS_AUDIOCD_DEFAULT_H
23 #define BACKENDS_AUDIOCD_DEFAULT_H
24 
25 #include "backends/audiocd/audiocd.h"
26 #include "audio/mixer.h"
27 
28 namespace Common {
29 class String;
30 } // End of namespace Common
31 
36 public:
38  virtual ~DefaultAudioCDManager();
39 
40  virtual bool open();
41  virtual void close();
42  virtual bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate = false,
44  virtual bool playAbsolute(int startFrame, int numLoops, int duration, bool onlyEmulate = false,
45  Audio::Mixer::SoundType soundType = Audio::Mixer::kMusicSoundType, const char *cuesheet = "disc.cue");
46  virtual void stop();
47  virtual bool isPlaying() const;
48  virtual void setVolume(byte volume);
49  virtual void setBalance(int8 balance);
50  virtual void update();
51  virtual Status getStatus() const; // Subclasses should override for better status results
52  virtual bool existExtractedCDAudioFiles(uint track);
53  virtual bool isDataAndCDAudioReadFromSameCD() { return false; }
54 
55 private:
56  void fillPotentialTrackNames(Common::Array<Common::String> &trackNames, int track) const;
57 
58 protected:
62  bool openRealCD();
63 
69  virtual bool openCD(int drive) { return false; }
70 
76  virtual bool openCD(const Common::Path &drive) { return false; }
77 
78  Audio::SoundHandle _handle;
79  bool _emulating;
80 
81  Status _cd;
82  Audio::Mixer *_mixer;
83 };
84 
85 #endif
Definition: mixer.h:65
Definition: audiocd.h:40
Definition: default-audiocd.h:35
Definition: path.h:52
virtual bool isDataAndCDAudioReadFromSameCD()
Definition: default-audiocd.h:53
Definition: mixer.h:49
SoundType
Definition: mixer.h:62
Definition: mixer.h:59
virtual bool openCD(int drive)
Definition: default-audiocd.h:69
Definition: algorithm.h:29
virtual bool openCD(const Common::Path &drive)
Definition: default-audiocd.h:76
Definition: audiocd.h:33