32#include "soundbuffer_session.h" 
   33#include "../Core/Resources/resource.h" 
   40        class XMLResourceDocument;
 
   43        class SoundBuffer_Session;
 
   45        class SoundBuffer_Impl;
 
   48        class ResourceManager;
 
   79                        const std::string &fullname,
 
   80                        bool streamed = 
false,
 
   81                        const std::string &format = 
"");
 
   84                        const std::string &filename,
 
   87                        const std::string &type = 
"");
 
   92                        const std::string &type);
 
  158                std::shared_ptr<SoundBuffer_Impl> impl;
 
 
Virtual File System (VFS).
Definition file_system.h:47
I/O Device interface.
Definition iodevice.h:50
Resource manager.
Definition resource_manager.h:44
Resource proxy of a specific type.
Definition resource.h:58
SoundBuffer_Session provides control over a playing soundeffect.
Definition soundbuffer_session.h:51
Sample interface in ClanLib.
Definition soundbuffer.h:56
void set_volume(float new_volume)
Sets the volume of the sound buffer in a relative measure (0->1)
void throw_if_null() const
Throw an exception if this object is invalid.
void set_pan(float new_pan)
Sets the panning of the sound buffer played in measures from -1 -> 1.
void add_filter(SoundFilter &filter)
Adds the sound filter to the sound buffer.
static Resource< SoundBuffer > resource(const std::string &id, const ResourceManager &resources)
Retrieves a SoundBuffer resource from the resource manager.
SoundBuffer()
Construct a null instance.
SoundBuffer_Session play(bool looping=false, SoundOutput *output=nullptr)
Plays the soundbuffer on the specified soundcard.
SoundProvider * get_provider() const
Returns the sound provider to be used for playback.
static SoundBuffer load(const std::string &id, const XMLResourceDocument &doc)
Loads a SoundBuffer from a XML resource definition.
bool is_null() const
Returns true if this object is invalid.
Definition soundbuffer.h:116
SoundBuffer(IODevice &file, bool streamed, const std::string &type)
SoundBuffer(const std::string &filename, bool streamed, const FileSystem &fs, const std::string &type="")
float get_volume() const
Returns the start/default volume used when the buffer is played.
void remove_filter(SoundFilter &filter)
Remove the sound filter from the sound buffer.
SoundBuffer(const std::string &fullname, bool streamed=false, const std::string &format="")
SoundBuffer_Session prepare(bool looping=false, SoundOutput *output=nullptr)
Prepares the soundbuffer for playback on the specified soundcard.
SoundBuffer(SoundProvider *provider)
Construct sound buffer.
float get_pan() const
Returns the default panning position when the buffer is played.
Sound Filter Class.
Definition soundfilter.h:44
SoundOutput interface in ClanLib.
Definition soundoutput.h:48
Sound provider.
Definition soundprovider.h:46
XML Resource Document.
Definition xml_resource_document.h:48