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
28namespace Common {
29class String;
30} // End of namespace Common
31
36public:
38 virtual ~DefaultAudioCDManager();
39
40 bool open() override;
41 void close() override;
42 bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate = false,
44 bool playAbsolute(int startFrame, int numLoops, int duration, bool onlyEmulate = false,
45 Audio::Mixer::SoundType soundType = Audio::Mixer::kMusicSoundType, const char *cuesheet = "disc.cue") override;
46 void stop() override;
47 bool isPlaying() const override;
48 void setVolume(byte volume) override;
49 void setBalance(int8 balance) override;
50 void update() override;
51 Status getStatus() const override; // Subclasses should override for better status results
52 bool existExtractedCDAudioFiles(uint track) override;
53 bool isDataAndCDAudioReadFromSameCD() override { return false; }
54
55private:
56 void fillPotentialTrackNames(Common::Array<Common::String> &trackNames, int track) const;
57
58protected:
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:70
SoundType
Definition: mixer.h:73
@ kMusicSoundType
Definition: mixer.h:76
Definition: mixer.h:49
Definition: audiocd.h:33
Definition: path.h:52
Definition: default-audiocd.h:35
Status getStatus() const override
void close() override
bool isDataAndCDAudioReadFromSameCD() override
Definition: default-audiocd.h:53
bool isPlaying() const override
virtual bool openCD(int drive)
Definition: default-audiocd.h:69
bool open() override
void setVolume(byte volume) override
virtual bool openCD(const Common::Path &drive)
Definition: default-audiocd.h:76
void stop() override
bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate=false, Audio::Mixer::SoundType soundType=Audio::Mixer::kMusicSoundType) override
bool existExtractedCDAudioFiles(uint track) override
bool playAbsolute(int startFrame, int numLoops, int duration, bool onlyEmulate=false, Audio::Mixer::SoundType soundType=Audio::Mixer::kMusicSoundType, const char *cuesheet="disc.cue") override
void update() override
void setBalance(int8 balance) override
Definition: algorithm.h:29
Definition: audiocd.h:40