#include <sound.h>
Public Member Functions | |
Create methods | |
| CSound () | |
| CSound (const std::string &str, int vol=100) | |
| CSound (int index, int vol=100) | |
Load methods | |
| bool | load (const std::string &str, int vol=100) |
| Load a sound. | |
| bool | load (int index, int vol=100) |
Play methods | |
| bool | play (int vol=-1, int bal=0) const |
| Play the sound. | |
| bool | play_ent (ENTITY *pEnt, int vol=-1) const |
| Play the sound from an entity. | |
Misc methods | |
| bool | is_empty () |
| Is a valid sound loaded? | |
(c) 2007-2008 oP group Germany GbR. All rights reserved.
This source code is provided "as is" with no warranty and must not be distributed without written permission.
| CSound::CSound | ( | const std::string & | str, | |
| int | vol = 100 | |||
| ) |
| str | Name of the sound. | |
| vol | Default volume. |
| CSound::CSound | ( | int | index, | |
| int | vol = 100 | |||
| ) |
| index | SoundPool index of the sound. | |
| vol | Default volume. |
| bool CSound::load | ( | const std::string & | str, | |
| int | vol = 100 | |||
| ) |
Load a sound.
| str | Filename for sound to be loaded (from sound folder). | |
| vol | Playback volume. |
| bool CSound::load | ( | int | index, | |
| int | vol = 100 | |||
| ) |
| index | SoundPool index of the sound. | |
| vol | Default volume. |
| bool CSound::play | ( | int | vol = -1, |
|
| int | bal = 0 | |||
| ) | const |
Play the sound.
| vol | Volume. | |
| bal | Stereo balance. |
| bool CSound::play_ent | ( | ENTITY * | pEnt, | |
| int | vol = -1 | |||
| ) | const |
Play the sound from an entity.
| pEnt | ENTITY that the sound comes from. | |
| vol | Volume and Range/10. |
| bool CSound::is_empty | ( | ) |
Is a valid sound loaded?
1.5.4