fluidvis
Public Member Functions | List of all members
sx::AudioBuffer Class Reference

#include <SXCore.h>

Inheritance diagram for sx::AudioBuffer:
sx::SXResource

Public Member Functions

EX AudioBuffer (const string &id)
 
EX ~AudioBuffer ()
 
EX void load ()
 
EX void unload ()
 
EX bool isLoaded () const
 
EX void setPath (const string &path)
 
EX unsigned int getBufferID () const
 
- Public Member Functions inherited from sx::SXResource
virtual EX ~SXResource ()
 
EX const string & getID () const
 

Additional Inherited Members

- Protected Attributes inherited from sx::SXResource
string id
 

Detailed Description

Audio Buffer class. This class holds the dataset specifying sound. To play the content stored in an AudioBuffer, an AudioObject must be used. Multiple AudioObjects can use and playback the content of one buffer simultaneously.

Constructor & Destructor Documentation

EX sx::AudioBuffer::AudioBuffer ( const string &  id)

constructor

EX sx::AudioBuffer::~AudioBuffer ( )

deconstructor

Member Function Documentation

EX unsigned int sx::AudioBuffer::getBufferID ( ) const

Returns the OpenAL buffer id. If this is not loaded, 0 is returned.

EX bool sx::AudioBuffer::isLoaded ( ) const
virtual

returns true iff this is loaded

Implements sx::SXResource.

EX void sx::AudioBuffer::load ( )
virtual

If setPath was called with a valid url pointing to a file, load tries to load audio content to this. This is only loaded, iff the invocation of load succeeded in loading from the path specified by setPath. If setPath has not been called after the last successful invocation of load, the next invocation of load has no effect.

Implements sx::SXResource.

EX void sx::AudioBuffer::setPath ( const string &  path)

Specifies the path of a file from which the audio content of this will be loaded. Currently only wav files are supported.

EX void sx::AudioBuffer::unload ( )

deconstructs the currently loaded resources, and leaves this unloaded


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