ScummVM API documentation
sound.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 GNAP_SOUND_H
23#define GNAP_SOUND_H
24
25#include "gnap/gnap.h"
26#include "gnap/resource.h"
27#include "audio/mixer.h"
28#include "common/array.h"
29
30namespace Gnap {
31
32struct SoundItem {
33 int _resourceId;
34 Audio::SoundHandle _handle;
35};
36
37class SoundMan {
38public:
40 ~SoundMan();
41 void playSound(int resourceId, bool looping);
42 void stopSound(int resourceId);
43 void setSoundVolume(int resourceId, int volume);
44 bool isSoundPlaying(int resourceId);
45 void stopAll();
46 void update();
47protected:
48 GnapEngine *_vm;
50
51 int find(int resourceId);
52};
53
54} // End of namespace Gnap
55
56#endif // GNAP_SOUND_H
Definition: mixer.h:49
Definition: array.h:52
Definition: gnap.h:222
Definition: sound.h:37
Definition: sound.h:32