JNGL
Public Member Functions | List of all members
SoundFile Class Reference

Sound loaded from an OGG file. More...

#include <jngl/SoundFile.hpp>

Public Member Functions

 SoundFile (const std::string &filename)
 Load an OGG file called filename.
 
 SoundFile (const SoundFile &)=delete
 
SoundFileoperator= (const SoundFile &)=delete
 
 SoundFile (SoundFile &&) noexcept
 
SoundFileoperator= (SoundFile &&) noexcept
 
void play ()
 Play the sound once. If called twice the sound would also play twice.
 
void stop ()
 Stop the last started sound.
 
bool isPlaying ()
 Whether the sound is still playing at least once.
 
void loop ()
 Play the sound in a loop. Can also be stopped using stop()
 
void setPitch (float)
 Set pitch in (0.0f, ∞]. Default is 1.0f.
 
void setVolume (float v)
 Set volume in [0, ∞]. Default is 1.0f.
 

Detailed Description

Sound loaded from an OGG file.

Definition at line 17 of file SoundFile.hpp.


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