1 /* ScummVM - Graphic Adventure Engine
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.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
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.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 #ifndef SOUND_AUDIOCD_H
27 #define SOUND_AUDIOCD_H
29 #include "common/scummsys.h"
30 #include "common/singleton.h"
31 #include "sound/mixer.h"
37 class AudioCDManager
: public Common::Singleton
<AudioCDManager
> {
48 * Start playback of the specified "CD" track. This method mimics
49 * the interface of OSystem::playCD (which it in fact may call, if an Audio CD is
50 * present), but also can play digital audio tracks in various formats.
52 * @param track the track to play.
53 * @param num_loops how often playback should be repeated (-1 = infinitely often).
54 * @param start_frame the frame at which playback should start (75 frames = 1 second).
55 * @param duration the number of frames to play (0: play until end)
56 * @param only_emulate if true, don't try to play from a real CD
58 void play(int track
, int numLoops
, int startFrame
, int duration
, bool only_emulate
= false);
60 bool isPlaying() const;
64 Status
getStatus() const;
67 friend class Common::Singleton
<SingletonBaseType
>;
70 /* used for emulated CD music */
78 /** Shortcut for accessing the audio CD manager. */
79 #define AudioCD Audio::AudioCDManager::instance()
81 } // End of namespace Audio