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

A class used to represent music. More...

#include <Music.hpp>

Inheritance diagram for lm::Music:
lm::Sound

Public Member Functions

 Music ()
 
 Music (const Music &)=delete
 
 Music (Music &&rhs)
 
Musicoperator= (const Music &)=delete
 
Musicoperator= (Music &&rhs)
 
void play (Vector3f pos={0.f, 0.f, 0.f})
 
void pause ()
 
void stop ()
 
void setVolume (float volume)
 
 ~Music ()
 
- 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 music.

Constructor & Destructor Documentation

lm::Music::Music ( )

Create an empty music

lm::Music::Music ( const Music )
delete

Deleted ctor

lm::Music::Music ( Music &&  rhs)

Move-construct a music

Parameters
rhsSource music
lm::Music::~Music ( )

Music dtor

Member Function Documentation

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

Deleted assignment operator

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

Move-assign a music

Parameters
rhsSource music
void lm::Music::pause ( )
virtual

Pause the loaded music

Implements lm::Sound.

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

Play the loaded music

Parameters
posSource position

Implements lm::Sound.

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

Set the volume of loaded music

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

Stop the loaded music

Implements lm::Sound.


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