Lums
Public Member Functions | List of all members
lm::Sfx Class Reference

A class used to represent sound effect. More...

#include <Sfx.hpp>

Inheritance diagram for lm::Sfx:
lm::Sound

Public Member Functions

 Sfx ()
 
 Sfx (const Sfx &)=delete
 
 Sfx (Sfx &&rhs)
 
Sfxoperator= (const Sfx &)=delete
 
Sfxoperator= (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
 

Detailed Description

A class used to represent sound effect.

Constructor & Destructor Documentation

lm::Sfx::Sfx ( )

Create an empty sound effect

lm::Sfx::Sfx ( const Sfx )
delete

Deleted ctor

lm::Sfx::Sfx ( Sfx &&  rhs)

Move-construct ctor

Parameters
rhsSource sound effect
lm::Sfx::~Sfx ( )

Sound dtor

Member Function Documentation

Sfx& lm::Sfx::operator= ( const Sfx )
delete

Deleted assignment operator

Sfx& lm::Sfx::operator= ( Sfx &&  rhs)

Move-assign a sound effect

Parameters
rhsSource sound effect
void lm::Sfx::pause ( )
virtual

Pause the loaded sound effect

Implements lm::Sound.

void lm::Sfx::play ( Vector3f  pos = {0.f, 0.f, 0.f})
virtual

Play the loaded sound effect

Parameters
posSource position

Implements lm::Sound.

void lm::Sfx::setVolume ( float  volume)

Set the volume of the loaded sound effect

Parameters
volumeThe volume, 0 being silent and 1 the loudest
void lm::Sfx::stop ( )
virtual

Stop the loaded sound effect

Implements lm::Sound.


The documentation for this class was generated from the following file: