Public Member Functions | |
| SoundState () | |
| may be only used for clone methods of osg | |
| SoundState (const std::string &name) | |
| ~SoundState () | |
| Destructor, releases any allocated sound sources. | |
| SoundState (const SoundState &state) | |
| Copy constructor. | |
| virtual osg::Object * | cloneType () const |
| virtual osg::Object * | clone (const osg::CopyOp ©op) const |
| virtual const char * | libraryName () const |
| virtual const char * | className () const |
| void | setName (const std::string &name) |
| Change the name of the SoundState to name. | |
| SoundState & | operator= (const SoundState &state) |
| Assignment operator. | |
| std::string | getName () const |
| Return the name of this soundstate. | |
| bool | hasSource () const |
| Returns true if the SoundState has allocated a soundsource. | |
| void | setSample (openalpp::Sample *sample) |
| Set the sample that this state will play. | |
| void | setStream (openalpp::Stream *stream) |
| Set the stream that this state will play. | |
| const openalpp::Sample * | getSample () const |
| Returns the sample if used. | |
| const openalpp::Stream * | getStream () const |
| Returns the stream if used. | |
| void | setPosition (const osg::Vec3 &pos) |
| Set the position of SoundState. | |
| osg::Vec3 | getPosition () const |
| Get the position of SoundState. | |
| void | setVelocity (const osg::Vec3 &vel) |
| Set the velocity of the SoundState. | |
| osg::Vec3 | getVelocity () const |
| Get the velocity of the SoundState. | |
| void | setDirection (const osg::Vec3 &dir) |
| Set the direction of the SoundState. | |
| osg::Vec3 | getDirection () const |
| Get the direction of the SoundState. | |
| void | setGain (float gain) |
| Set the gain (volume) of the soundstate (1.0 is default). | |
| float | getGain () const |
| Get the gain (volume) of the soundstate (1.0 is default). | |
| bool | getLooping () const |
| Return true if the sound state is in looping mode. | |
| void | setLooping (bool flag) |
| Set the SoundState in looping mode. | |
| void | setAmbient (bool flag) |
| Set the soundstate in ambient (no attenuation will be calculated). | |
| bool | getAmbient () const |
| Get the soundstate in ambient (no attenuation will be calculated). | |
| void | setRelative (bool flag) |
| Set the soundstate so it will always be relative to the listener in position. | |
| bool | getRelative () const |
| Get the soundstate so it will always be relative to the listener in position. | |
| void | setSoundCone (float innerAngle, float outerAngle, float outerGain) |
| float | getInnerAngle () const |
| Get the the inner angle of the cone for the SoundState in degrees. | |
| float | getOuterAngle () const |
| Get the the outer angle of the cone for the SoundState in degrees. | |
| float | getOuterGain () const |
| Get the the outer gain of the cone for the SoundState. | |
| bool | isActive () |
| void | setReferenceDistance (float distance) |
| Set the reference distance for the SoundState. | |
| float | getReferenceDistance () const |
| Get the reference distance for the SoundState. | |
| void | setMaxDistance (float max) |
| float | getMaxDistance () const |
| void | setRolloffFactor (float roll) |
| Specifies the roll of factor for the SoundState, 1.0 is default. | |
| float | getRolloffFactor () const |
| Return the roll of factor for the SoundState, 1.0 is default. | |
| void | setPitch (float pitch) |
| Set the pitch (rate) for the SoundState (1.0 is default). | |
| float | getPitch () const |
| Get the pitch (rate) for the SoundState (1.0 is default). | |
| void | setPlay (bool flag) |
| Starts to play the SoundState. | |
| bool | getPlay () |
| Return if the soundstate will play. | |
| void | setOccludeDampingFactor (float d) |
| float | getOccludeDampingFactor () const |
| void | setOccludeScale (float d) |
| float | getOccludeScale () const |
| void | setOccluded (bool f) |
| bool | getOccluded () const |
| void | setStopMethod (openalpp::SourceState s) |
| Set whether paus or stop should be used when calling setPlay(false). | |
| bool | isPlaying () |
| Returns true if there is a source and it is playing. | |
| bool | isPlaying () const |
| Returns with const true if there is a source and it is playing. | |
| openalpp::SourceState | getStopMethod () const |
| bool | allocateSource (unsigned int priority=0, bool registrate_as_active=true) |
| unsigned int | getPriority () const |
| Return the priority set for this SoundState. | |
| void | setSource (openalpp::Source *source) |
| Set the Source for this SoundState. | |
| const openalpp::Source * | getSource () const |
| Return the Source for this SoundState. | |
| void | releaseSource () |
| Release the Source that is allocated for this SoundState. | |
| void | apply () |
| Performs the actual modification to the allocated Source. | |
This class stores the attributes for a sound source. It can exist with a sound source allocated to it, (hasSource() == true) which makes it the same thing as a sound source. Otherwise, it works as a placeholder (state) for a sound source. It can be assigned a sound source at anytime. Then apply() is called and it has a sound source the actual settings will be performed. It a state has a sound source all the set*() method calls apply automatically.
|
|
may be only used for clone methods of osg Constructor |
|
|
Constructor
|
|
|
Destructor, releases any allocated sound sources.
|
|
|
Copy constructor.
|
|
||||||||||||
|
Allocates a soundsource for this soundstate
|
|
|
Performs the actual modification to the allocated Source.
|
|
|
|
|
|
|
|
|
|
|
|
Get the soundstate in ambient (no attenuation will be calculated).
|
|
|
Get the direction of the SoundState.
|
|
|
Get the gain (volume) of the soundstate (1.0 is default).
|
|
|
Get the the inner angle of the cone for the SoundState in degrees.
|
|
|
Return true if the sound state is in looping mode.
|
|
|
Get the maximum distance for the SoundState, that is further away from the listener the source will be turned of when in the InverseClamp sound mode 1.0 is default |
|
|
Return the name of this soundstate.
|
|
|
|
|
|
|
|
|
|
|
|
Get the the outer angle of the cone for the SoundState in degrees.
|
|
|
Get the the outer gain of the cone for the SoundState.
|
|
|
Get the pitch (rate) for the SoundState (1.0 is default).
|
|
|
Return if the soundstate will play.
|
|
|
Get the position of SoundState.
|
|
|
Return the priority set for this SoundState.
|
|
|
Get the reference distance for the SoundState.
|
|
|
Get the soundstate so it will always be relative to the listener in position.
|
|
|
Return the roll of factor for the SoundState, 1.0 is default.
|
|
|
Returns the sample if used.
|
|
|
Return the Source for this SoundState.
|
|
|
|
|
|
Returns the stream if used.
|
|
|
Get the velocity of the SoundState.
|
|
|
Returns true if the SoundState has allocated a soundsource.
|
|
|
|
|
|
Returns with const true if there is a source and it is playing.
|
|
|
Returns true if there is a source and it is playing.
|
|
|
|
|
|
Assignment operator.
|
|
|
Release the Source that is allocated for this SoundState.
|
|
|
Set the soundstate in ambient (no attenuation will be calculated).
|
|
|
Set the direction of the SoundState.
|
|
|
Set the gain (volume) of the soundstate (1.0 is default).
|
|
|
Set the SoundState in looping mode.
|
|
|
Set the maximum distance for the SoundState, that is further away from the listener the source will be turned of when in the InverseClamp sound mode 1.0 is default |
|
|
Change the name of the SoundState to name.
|
|
|
|
|
|
|
|
|
|
|
|
Set the pitch (rate) for the SoundState (1.0 is default).
|
|
|
Starts to play the SoundState.
|
|
|
Set the position of SoundState.
|
|
|
Set the reference distance for the SoundState.
|
|
|
Set the soundstate so it will always be relative to the listener in position.
|
|
|
Specifies the roll of factor for the SoundState, 1.0 is default.
|
|
|
Set the sample that this state will play.
|
|
||||||||||||||||
|
Specifies the sound cone for a directional sound source. When outside the cone, the outer gain is the gain used in the attenuation calculation. |
|
|
Set the Source for this SoundState.
|
|
|
Set whether paus or stop should be used when calling setPlay(false).
|
|
|
Set the stream that this state will play.
|
|
|
Set the velocity of the SoundState.
|
1.4.6