Lums
|
A class used to represent sound effect. More...
#include <Sfx.hpp>
Public Member Functions | |
Sfx () | |
Sfx (const Sfx &)=delete | |
Sfx (Sfx &&rhs) | |
Sfx & | operator= (const Sfx &)=delete |
Sfx & | operator= (Sfx &&rhs) |
void | play (Vector3f pos={0.f, 0.f, 0.f}) |
void | pause () |
void | stop () |
void | setVolume (float volume) |
~Sfx () | |
Public Member Functions inherited from lm::Sound | |
void | setPath (const std::string name, bool resource=true) |
void | load () |
bool | loaded () |
void | unload () |
Additional Inherited Members | |
Protected Member Functions inherited from lm::Sound | |
void | loadFileOGG () |
void | setVolumeLimits (ALuint *source, ALfloat *maxGain, ALfloat *minGain) |
Protected Attributes inherited from lm::Sound | |
float | volume |
FILE * | file |
OggVorbis_File | stream |
ALenum | format |
ALsizei | sampleRate |
std::string | path |
A class used to represent sound effect.
lm::Sfx::Sfx | ( | ) |
Create an empty sound effect
|
delete |
Deleted ctor
lm::Sfx::Sfx | ( | Sfx && | rhs | ) |
Move-construct ctor
rhs | Source sound effect |
lm::Sfx::~Sfx | ( | ) |
Sound dtor
|
virtual |
Pause the loaded sound effect
Implements lm::Sound.
|
virtual |
void lm::Sfx::setVolume | ( | float | volume | ) |
Set the volume of the loaded sound effect
volume | The volume, 0 being silent and 1 the loudest |
|
virtual |
Stop the loaded sound effect
Implements lm::Sound.