Defines a class for loading and storing sound effects.
More...
#include <soundeffect.h>
|
| static SoundEffect * | load (SDL_RWops *rw) |
| | Loads a sample from a buffer in memory.
|
| |
Defines a class for loading and storing sound effects.
Definition at line 31 of file soundeffect.h.
◆ ~SoundEffect()
| SoundEffect::~SoundEffect |
( |
| ) |
|
|
override |
◆ SoundEffect()
| SoundEffect::SoundEffect |
( |
Mix_Chunk * |
soundEffect | ) |
|
|
inlineprotected |
◆ load()
Loads a sample from a buffer in memory.
- Parameters
-
| rw | The SDL_RWops to load the sample data from. |
- Returns
nullptr if the an error occurred, a valid pointer otherwise.
Definition at line 31 of file soundeffect.cpp.
◆ play()
| int SoundEffect::play |
( |
int |
loops, |
|
|
int |
volume, |
|
|
int |
channel = -1 |
|
) |
| |
Plays the sample.
- Parameters
-
| loops | Number of times to repeat the playback. |
| volume | Sample playback volume. |
| channel | Sample playback channel. |
- Returns
- which channel was used to play the sound, or -1 if sound could not be played.
Definition at line 43 of file soundeffect.cpp.
◆ mChunk
| Mix_Chunk* SoundEffect::mChunk |
|
protected |
The documentation for this class was generated from the following files: