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
30
namespace
Gnap
{
31
32
struct
SoundItem
{
33
int
_resourceId;
34
Audio::SoundHandle
_handle;
35
};
36
37
class
SoundMan
{
38
public
:
39
SoundMan
(
GnapEngine
*vm);
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();
47
protected
:
48
GnapEngine
*_vm;
49
Common::Array<SoundItem>
_items;
50
51
int
find
(
int
resourceId);
52
};
53
54
}
// End of namespace Gnap
55
56
#endif // GNAP_SOUND_H
Gnap::SoundItem
Definition:
sound.h:32
Common::Array
Definition:
array.h:52
Common::find
In find(In first, In last, const T &v)
Definition:
algorithm.h:225
Audio::SoundHandle
Definition:
mixer.h:49
Gnap
Definition:
character.h:25
Gnap::GnapEngine
Definition:
gnap.h:222
Gnap::SoundMan
Definition:
sound.h:37
engines
gnap
sound.h
Generated on Fri Nov 22 2024 09:12:00 for ScummVM API documentation by
1.8.13