ScummVM API documentation
sdl-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_SDL_H
23 #define BACKENDS_AUDIOCD_SDL_H
24 
25 #include "backends/audiocd/default/default-audiocd.h"
26 
27 #include "backends/platform/sdl/sdl-sys.h"
28 
29 #if !SDL_VERSION_ATLEAST(2, 0, 0)
30 
35 public:
37  virtual ~SdlAudioCDManager();
38 
39  bool open() override;
40  void close() override;
41  bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate,
42  Audio::Mixer::SoundType soundType) override;
43  void stop() override;
44  bool isPlaying() const override;
45  void update() override;
46 
47 protected:
48  bool openCD(int drive) override;
49 
50  SDL_CD *_cdrom;
51  int _cdTrack, _cdNumLoops, _cdStartFrame, _cdDuration;
52  uint32 _cdEndTime, _cdStopTime;
53 };
54 
55 #endif // !SDL_VERSION_ATLEAST(2, 0, 0)
56 
57 #endif
Definition: default-audiocd.h:35
Definition: sdl-audiocd.h:34
void close() override
bool openCD(int drive) override
bool isPlaying() const override
SoundType
Definition: mixer.h:62
void stop() override
void update() override
bool open() override
bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate, Audio::Mixer::SoundType soundType) override