ScummVM API documentation
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_ABSTRACT_H
23 #define BACKENDS_AUDIOCD_ABSTRACT_H
24 
25 #include "audio/mixer.h"
26 #include "common/scummsys.h"
27 #include "common/noncopyable.h"
28 
34 public:
35  virtual ~AudioCDManager() {}
36 
40  struct Status {
41  bool playing;
42  int track;
43  int start;
44  int duration;
45  int numLoops;
46  int volume;
47  int balance;
48  };
49 
54  virtual bool open() = 0;
55 
59  virtual void close() = 0;
60 
72  virtual bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate = false,
74 
86  virtual bool playAbsolute(int startFrame, int numLoops, int duration, bool onlyEmulate = false,
87  Audio::Mixer::SoundType soundType = Audio::Mixer::kMusicSoundType, const char *cuesheet = "disc.cue") = 0;
88 
93  virtual bool isPlaying() const = 0;
94 
98  virtual void setVolume(byte volume) = 0;
99 
103  virtual void setBalance(int8 balance) = 0;
104 
108  virtual void stop() = 0;
109 
113  virtual void update() = 0;
114 
119  virtual Status getStatus() const = 0;
120 
126  virtual bool existExtractedCDAudioFiles(uint track) = 0;
127 
132  virtual bool isDataAndCDAudioReadFromSameCD() = 0;
133 };
134 
135 #endif
Definition: mixer.h:65
Definition: audiocd.h:40
virtual void update()=0
virtual bool playAbsolute(int startFrame, int numLoops, int duration, bool onlyEmulate=false, Audio::Mixer::SoundType soundType=Audio::Mixer::kMusicSoundType, const char *cuesheet="disc.cue")=0
virtual bool existExtractedCDAudioFiles(uint track)=0
Definition: noncopyable.h:39
virtual bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate=false, Audio::Mixer::SoundType soundType=Audio::Mixer::kMusicSoundType)=0
SoundType
Definition: mixer.h:62
virtual bool open()=0
virtual void stop()=0
virtual void setBalance(int8 balance)=0
virtual bool isPlaying() const =0
virtual Status getStatus() const =0
virtual void setVolume(byte volume)=0
Definition: audiocd.h:33
virtual bool isDataAndCDAudioReadFromSameCD()=0
virtual void close()=0