List of all members
clan::SoundBuffer Class Reference
clanSound Audio Mixing

Sample interface in ClanLib. More...

`#include <soundbuffer.h>`

## Public Member Functions
Construction
| SoundBuffer ()
| Construct a null instance. More...
| SoundBuffer (SoundProvider *provider)
| Construct sound buffer. More...
| SoundBuffer (const std::string &fullname, bool streamed=false, const std::string &format="")
| SoundBuffer (const std::string &filename, bool streamed, const FileSystem &fs, const std::string &type="")
| SoundBuffer (IODevice &file, bool streamed, const std::string &type)
Attributes
SoundProvider * | get_provider () const
| Returns the sound provider to be used for playback. More...
float | get_volume () const
| Returns the start/default volume used when the buffer is played. More...
float | get_pan () const
| Returns the default panning position when the buffer is played. More...
bool | is_null () const
| Returns true if this object is invalid. More...
void | throw_if_null () const
| Throw an exception if this object is invalid. More...
Operations
void | set_volume (float new_volume)
| Sets the volume of the sound buffer in a relative measure (0->1) More...
void | set_pan (float new_pan)
| Sets the panning of the sound buffer played in measures from -1 -> 1. More...
void | add_filter (SoundFilter &filter)
| Adds the sound filter to the sound buffer. More...
void | remove_filter (SoundFilter &filter)
| Remove the sound filter from the sound buffer. More...
SoundBuffer_Session | play (bool looping=false, SoundOutput *output=nullptr)
| Plays the soundbuffer on the specified soundcard. More...
SoundBuffer_Session | prepare (bool looping=false, SoundOutput *output=nullptr)
| Prepares the soundbuffer for playback on the specified soundcard. More...

## Resources
virtual | ~SoundBuffer ()
static Resource< SoundBuffer > | resource (const std::string &id, const ResourceManager &resources)
| Retrieves a SoundBuffer resource from the resource manager. More...
static SoundBuffer | load (const std::string &id, const XMLResourceDocument &doc)
| Loads a SoundBuffer from a XML resource definition. More...

## Detailed Description

Sample interface in ClanLib.

The SoundBuffer class represents a sample in ClanLib. It can either be static or streamed. The soundbuffer gets its sample data from a soundprovider, that is passed during construction.

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

- soundbuffer.h