ScummVM API documentation
music.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 SCUMM_MUSIC_H
23#define SCUMM_MUSIC_H
24
25#include "common/serializer.h"
26#include "common/scummsys.h"
27
28namespace Scumm {
29
41public:
42 ~MusicEngine() override {}
43
50 virtual void setMusicVolume(int vol) = 0;
51
59 virtual void setSfxVolume(int vol) {}
60
65 virtual void startSound(int sound) = 0;
66
72 virtual void startSoundWithTrackID(int sound, int track) { startSound(sound); }
73
78 virtual void stopSound(int sound) = 0;
79
83 virtual void stopAllSounds() = 0;
84
91 virtual int getSoundStatus(int sound) const = 0;
92
98 virtual int getMusicTimer() { return 0; }
99
104 virtual void setQuality(int qual) {}
105
109 virtual void toggleMusic(bool enable) {}
110 virtual void toggleSoundEffects(bool enable) {}
111
116
122 virtual void restoreAfterLoad() {}
123};
124
125} // End of namespace Scumm
126
127#endif
Definition: serializer.h:352
Definition: serializer.h:80
Definition: music.h:40
virtual void setMusicVolume(int vol)=0
virtual void stopAllSounds()=0
virtual void toggleMusic(bool enable)
Definition: music.h:109
virtual int getSoundStatus(int sound) const =0
virtual void restoreAfterLoad()
Definition: music.h:122
virtual void startSoundWithTrackID(int sound, int track)
Definition: music.h:72
virtual void startSound(int sound)=0
virtual void setQuality(int qual)
Definition: music.h:104
virtual void setSfxVolume(int vol)
Definition: music.h:59
void saveLoadWithSerializer(Common::Serializer &ser) override
Definition: music.h:115
virtual void stopSound(int sound)=0
virtual int getMusicTimer()
Definition: music.h:98
Definition: actor.h:30