ScummVM API documentation
atari-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_ATARI_H
23#define BACKENDS_AUDIOCD_ATARI_H
24
25#include "backends/audiocd/default/default-audiocd.h"
26
27#include <mint/cdromio.h>
28#include <mint/metados.h>
29
30#include "common/array.h"
31
37public:
39 ~AtariAudioCDManager() override;
40
41 bool open() override;
42 void close() override;
43 bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate,
44 Audio::Mixer::SoundType soundType) override;
45 void stop() override;
46 bool isPlaying() const override;
47 void update() override;
48 bool existExtractedCDAudioFiles(uint track) override;
49
50protected:
51 bool openCD(int drive) override;
52
53private:
54 enum { kMaxDrives = 32 };
55
56 struct Drive {
57 char letter; // Drive letter ('A'..'Z'), 0 if absent
58 metaopen_t metaopen; // Filled in while the drive is open
59 };
60
61 bool loadTOC();
62 int ioctl(int command, void *arg) const;
63 bool startPlayback(int track, int startFrame, int duration);
64 void routeADC(bool enable);
65
66 Drive _drives[kMaxDrives];
67 int _numDrives;
68 int _drive; // Index into _drives, -1 if no drive is open
69
70 // GEMDOS-to-BOS drive mapping table from metainit.info->log2phys
71 // (NULL if MetaDOS didn't supply one)
72 const char *_log2phys;
73
74 Common::Array<cdrom_tocentry> _tocEntries; // Includes the leadout as the final entry
75
76 bool _adcRouted; // True while the ADC is added to the output for us
77
78 int _cdTrack;
79 int _cdNumLoops;
80 int _cdStartFrame;
81 int _cdDuration;
82 uint32 _cdEndTime;
83 uint32 _cdStopTime;
84};
85
86#endif
Definition: atari-audiocd.h:36
bool isPlaying() const override
void stop() override
bool play(int track, int numLoops, int startFrame, int duration, bool onlyEmulate, Audio::Mixer::SoundType soundType) override
bool open() override
bool existExtractedCDAudioFiles(uint track) override
bool openCD(int drive) override
void update() override
void close() override
SoundType
Definition: mixer.h:73
Definition: default-audiocd.h:35