#include <sourcebase.h>
Inheritance diagram for openalpp::SourceBase:
Public Member Functions | |
void | play () |
void | pause () |
void | stop () |
void | rewind () |
SourceState | getState () const |
void | setLooping (bool loop=true) |
bool | isLooping () const |
void | setDirection (float directionx, float directiony, float directionz) |
void | getDirection (float &directionx, float &directiony, float &directionz) const |
void | makeOmniDirectional () |
void | setSoundCone (float innerangle, float outerangle=360.0, float outergain=0.0) |
void | getSoundCone (float &innerangle, float &outerangle, float &outergain) const |
void | setGain (float gain) |
float | getGain () const |
void | setMinMaxGain (float min=0.0, float max=1.0) |
void | getMinMaxGain (float &min, float &max) const |
void | setAmbient (bool ambient=true) |
bool | isAmbient () const |
void | setRelative (bool relative=true) |
bool | isRelative () const |
void | setReferenceDistance (float distance=1.0) |
float | getReferenceDistance () const |
void | setMaxDistance (float distance) |
float | getMaxDistance () const |
void | setRolloffFactor (float factor=1.0) |
float | getRolloffFactor () const |
void | setPitch (float pitch=1.0) |
float | getPitch () const |
void | setReverbScale (float scale) throw (InitError,ValueError) |
void | setReverbDelay (float delay) throw (InitError,ValueError) |
float | getReverbDelay () throw (InitError) |
float | getReverbScale () throw (InitError) |
ALuint | link (const SourceBase *source) throw (MemoryError) |
void | unlink (const SourceBase *source) throw (NameError) |
void | unlink (const ALuint name) throw (NameError) |
void | unlinkAll () |
ALuint | getAlSource () const |
void | setPosition (float x, float y, float z) |
void | getPosition (float &x, float &y, float &z) const |
void | setVelocity (float vx, float vy, float vz) |
void | getVelocity (float &vx, float &vy, float &vz) const |
SourceBase & | operator= (const SourceBase &sourcebase) |
Protected Member Functions | |
virtual | ~SourceBase () |
SourceBase () throw (MemoryError,NameError) | |
SourceBase (float x, float y, float z) throw (MemoryError,NameError) | |
SourceBase (const SourceBase &sourcebase) | |
Protected Attributes | |
ALuint | sourcename_ |
bool | streaming_ |
|
Destructor. |
|
Constructor. |
|
Constructor.
|
|
Copy constructor. |
|
Returns the OpenAL name of the source. Can be used to directly modify the source with OpenAL functions. |
|
Gets the direction of the source.
|
|
Gets the gain (volume).
|
|
Gets the maximum distance.
|
|
Gets maximum and minumum gain.
|
|
Gets the pitch.
|
|
Inherited from PositionedObject. Implements openalpp::PositionedObject. |
|
Gets the reference distance.
|
|
Get reverb delay for this source.
|
|
Get reverb scale for this source.
|
|
Gets the roll-off factor.
|
|
Gets the sound cone parameters.
|
|
Get the current state.
|
|
Inherited from PositionedObject. Implements openalpp::PositionedObject. |
|
Check if the source is ambient.
|
|
Check whether the source is looping.
|
|
Check if the source's position is relative.
|
|
Link this source to another. This causes calls to Play(), Pause(), Stop() and Rewind() (on this source) to be applied to all sources this has been linked to, synchronously.
|
|
Makes the source omni-directional. The same effect can be achieved by calling SetDirection(0,0,0) |
|
Assignment operator. |
|
Pause the source. Reimplemented in openalpp::Source. |
|
Play the source. Reimplemented in openalpp::GroupSource, and openalpp::Source. |
|
Rewind the source. |
|
Makes the source ambient (or makes it stop being ambient). This function _will_ change the source's position, direction and roll-off factor.
|
|
Sets the direction of the source.
|
|
Sets gain (volume). The volume a source will be played at will be multiplied by this _after_ the attenuation calculations. Note: In todays's implementation on Linux, gain is clamped to [0.0,1.0]. This will be changed in future releases of OpenAL.
|
|
Turn on/off looping.
|
|
Sets the maximum distance. This is used in attenuation calculations, if the distance model is InverseDistanceClamped.
|
|
Sets maximum and minimum gain this source will be played at. I.e. the gain will be clamped to these values.
|
|
Sets the pitch. 1.0 is normal. Each reduction by 50% equals a reduction by one octave.
|
|
Inherited from PositionedObject. Implements openalpp::PositionedObject. |
|
Sets the reference distance for this source. The reference distance is used in attenuation calculations.
|
|
Makes the source's position relative (or makes it stop being relative). This means that the position in space will not be absolute, but rather relative to the listener.
|
|
Set reverb delay for this source. AudioEnviroment::InitiateReverb() must be called before using this. This is how many seconds back in time the echo will be.
|
|
Set reverb scale for this source. This is simply the scale of the "echo." AudioEnviroment::InitiateReverb() must be called before this.
|
|
Sets the roll-off factor. This is used in distance attenuation calculations.
|
|
Sets the sound cone parameters for a directional sound source. This function has no effect on omni-directional sources. Two cones, with the top at the source, and turned the same direction as the source, are defined by this. Inside the inner cone (specified by innerangle), sound will be played at full volume (attenuated by distance), and outside the outer cone (specified by outerangle) sound will be played at the volume specified by outergain. Between these areas, the sound volume will be interpolated between normal gain and outergain.
|
|
Inherited from PositionedObject. Implements openalpp::PositionedObject. |
|
Stop the source. Reimplemented in openalpp::Source. |
|
Unlink this source from another.
|
|
Unlink this source from another.
|
|
Unlink all sources from this. |
|
OpenAL name for this source. |
|
Flag for whether the source is streaming. |