The small3d framework
Classes | Public Member Functions | List of all members
small3d::Sound Class Reference

Class that loads and plays a sound from an ogg file. More...

#include <Sound.hpp>

Public Member Functions

 Sound ()
 Default constructor.
 
 Sound (const std::string soundFilePath)
 Ogg file loading constructor. More...
 
 ~Sound ()
 Destructor.
 
void play (const bool repeat=false)
 Play the sound. More...
 
void stop ()
 Stop playing the sound.
 
 Sound (const Sound &other)
 Copy constructor.
 
 Sound (const Sound &&other)
 Move constructor.
 
Sound & operator= (const Sound &other)
 Copy assignment.
 
Sound & operator= (const Sound &&other)
 Move assignment.
 

Detailed Description

Class that loads and plays a sound from an ogg file.

Constructor & Destructor Documentation

◆ Sound()

small3d::Sound::Sound ( const std::string  soundFilePath)

Ogg file loading constructor.

Parameters
soundFilePathThe path to the ogg file from which to load the sound.

Member Function Documentation

◆ play()

void small3d::Sound::play ( const bool  repeat = false)

Play the sound.

Parameters
repeatRepeat the sound after it ends?

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