![]() |
ManaPlus
|
#include <soundeffect.h>
Public Member Functions | |
| SoundEffect (Mix_Chunk *const soundEffect, const std::string &name) | |
| ~SoundEffect () | |
| bool | play (const int loops, const int volume, const int channel) const |
| int | calcMemoryLocal () const |
| std::string | getCounterName () const |
Public Member Functions inherited from Resource | |
| Resource () | |
| ~Resource () | |
| virtual void | incRef () |
| virtual void | decRef () |
Public Member Functions inherited from MemoryCounter | |
| MemoryCounter () | |
| virtual | ~MemoryCounter () |
| int | calcMemory (const int level) const |
| virtual int | calcMemoryChilds (const int level) const |
Protected Attributes | |
| std::string | mName |
| Mix_Chunk * | mChunk |
Additional Inherited Members | |
Data Fields inherited from Resource | |
| time_t | mTimeStamp |
| std::string | mIdPath |
| std::string | mSource |
| unsigned int | mRefCount |
| bool | mProtected |
| bool | mNotCount |
Defines a class for loading and storing sound effects.
Definition at line 39 of file soundeffect.h.
|
inline |
| SoundEffect::~SoundEffect | ( | ) |
|
virtual |
Reimplemented from Resource.
Definition at line 41 of file soundeffect.cpp.
References Resource::calcMemoryLocal(), and SoundEffect().
|
inlinevirtual |
| bool SoundEffect::play | ( | const int | loops, |
| const int | volume, | ||
| const int | channel | ||
| ) | const |
Plays the sample.
| loops | Number of times to repeat the playback. |
| volume | Sample playback volume. |
| channel | Sample playback channel. |
true if the playback started properly false otherwise. Definition at line 33 of file soundeffect.cpp.
References mChunk.
Referenced by SoundManager::playGuiSfx(), and SoundManager::playSfx().
|
protected |
Definition at line 80 of file soundeffect.h.
Referenced by play(), and ~SoundEffect().
|
protected |
Definition at line 79 of file soundeffect.h.
Referenced by getCounterName().