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 BBVS_SOUND_H
23
#define BBVS_SOUND_H
24
25
#include "audio/mixer.h"
26
#include "common/array.h"
27
28
namespace
Audio
{
29
class
RewindableAudioStream;
30
}
31
32
namespace
Bbvs
{
33
34
class
Sound
{
35
public
:
36
Sound
();
37
~
Sound
();
38
void
load(
const
Common::Path
&filename);
39
void
play(
bool
loop);
40
void
stop();
41
bool
isPlaying();
42
protected
:
43
Audio::RewindableAudioStream
*_stream;
44
Audio::SoundHandle
_handle;
45
// Keep the filename for debugging purposes
46
Common::Path
_filename;
47
};
48
49
class
SoundMan
{
50
public
:
51
~
SoundMan
();
52
void
loadSound(
const
Common::Path
&fileName);
53
void
playSound(uint index,
bool
loop =
false
);
54
void
stopSound(uint index);
55
bool
isSoundPlaying(uint index);
56
bool
isAnySoundPlaying(uint *indices, uint count);
57
void
unloadSounds();
58
void
stopAllSounds();
59
protected
:
60
Common::Array<Sound*>
_sounds;
61
};
62
63
}
// End of namespace Bbvs
64
65
#endif // BBVS_SOUND_H
Common::Array
Definition:
array.h:52
Common::Path
Definition:
path.h:52
Audio::SoundHandle
Definition:
mixer.h:49
Bbvs
Definition:
bbvs.h:42
Bbvs::Sound
Definition:
sound.h:34
Audio::RewindableAudioStream
Definition:
audiostream.h:109
Bbvs::SoundMan
Definition:
sound.h:49
Audio
Definition:
system.h:38
engines
bbvs
sound.h
Generated on Thu Jan 2 2025 09:09:14 for ScummVM API documentation by
1.8.13