#include <groupsource.h>
Inheritance diagram for openalpp::GroupSource:
Public Member Functions | |
GroupSource (float x=0.0, float y=0.0, float z=0.0) throw (NameError) | |
void | play () throw (InitError,FileError) |
void | mixSources (unsigned int frequency=22050) throw (InitError,FileError,FatalError,MemoryError,ValueError) |
ALuint | includeSource (Source *source) throw (ValueError) |
void | excludeSource (const Source &source) throw (NameError) |
void | excludeSource (ALuint source) throw (NameError) |
GroupSource (const GroupSource &groupsource) | |
GroupSource & | operator= (const GroupSource &groupsource) |
Protected Member Functions | |
virtual | ~GroupSource () |
openalpp::GroupSource::GroupSource | ( | float | x = 0.0 , |
|
float | y = 0.0 , |
|||
float | z = 0.0 | |||
) | throw (NameError) |
Constructor. Creates the group source at the specified position.
x | x coordinate. | |
y | y coordinate. | |
z | z coordinate. |
openalpp::GroupSource::GroupSource | ( | const GroupSource & | groupsource | ) |
Copy constructor.
virtual openalpp::GroupSource::~GroupSource | ( | ) | [protected, virtual] |
Destructor.
void openalpp::GroupSource::excludeSource | ( | ALuint | source | ) | throw (NameError) |
Removes a source from the group. This will of course require the remaining sources to be mixed again.
source | is the identifier of the source to exclude. |
Removes a source from the group. This will of course require the remaining sources to be mixed again.
source | is the source to exclude. |
ALuint openalpp::GroupSource::includeSource | ( | Source * | source | ) | throw (ValueError) |
Includes a source in the group. Returns an identifier that can be used as an argument to ExcludeSource(). This identifier is also the OpenAL name for the included source.
source | is (a pointer to) the source to include. |
void openalpp::GroupSource::mixSources | ( | unsigned int | frequency = 22050 |
) | throw (InitError,FileError,FatalError,MemoryError,ValueError) |
Mix all added sources into one. This function will be called by Play(), if sources have been included since the last time MixSamples() was called, so if you want the source to start playing as fast as possible after the Play()-call, MixSources() should be called separately
frequency | is the frequency that will be used when mixing. |
GroupSource& openalpp::GroupSource::operator= | ( | const GroupSource & | groupsource | ) |
Assignment operator.
Same as SourceBase::Play, except that this mixes the sources in the group if it haven't been done yet.
Reimplemented from openalpp::SourceBase.