PixelLightAPI
.
|
Scene node modifier which is able to playback a sound. More...
#include <SNMSound.h>
Public Types | |
enum | EFlags { Stream = 1<<2, No3D = 1<<3, NoLoop = 1<<4, NoStartPlayback = 1<<5 } |
Scene node modifier flags (SceneNodeModifier flags extension) More... | |
Public Member Functions | |
PLSOUND_API float | GetVolume () const |
PLSOUND_API void | SetVolume (float fValue) |
PLSOUND_API float | GetPitch () const |
PLSOUND_API void | SetPitch (float fValue) |
PLSOUND_API float | GetReferenceDistance () const |
PLSOUND_API void | SetReferenceDistance (float fValue) |
PLSOUND_API float | GetMaxDistance () const |
PLSOUND_API void | SetMaxDistance (float fValue) |
PLSOUND_API float | GetRolloffFactor () const |
PLSOUND_API void | SetRolloffFactor (float fValue) |
virtual PLSOUND_API void | SetFlags (PLCore::uint32 nValue) override |
PLSOUND_API | SNMSound (PLScene::SceneNode &cSceneNode) |
Constructor. | |
virtual PLSOUND_API | ~SNMSound () |
Destructor. | |
PLSOUND_API Source * | GetSoundSource () const |
Returns the sound source. | |
Protected Member Functions | |
virtual PLSOUND_API void | OnActivate (bool bActivate) override |
Called when the scene node modifier has been activated or deactivated. | |
Protected Attributes | |
PLCore::String | m_sSound |
float | m_fVolume |
float | m_fPitch |
float | m_fReferenceDistance |
float | m_fMaxDistance |
float | m_fRolloffFactor |
Scene node modifier which is able to playback a sound.
Scene node modifier flags (SceneNodeModifier flags extension)
Stream |
Stream the file (recommended for large files!) |
No3D |
No 3D sound |
NoLoop |
Do not loop the sound playback |
NoStartPlayback |
Do not start sound playback after scene node initialization |
Reimplemented from PLScene::SceneNodeModifier.
PLSOUND_API PLSound::SNMSound::SNMSound | ( | PLScene::SceneNode & | cSceneNode | ) |
Constructor.
[in] | cSceneNode | Owner scene node |
virtual PLSOUND_API PLSound::SNMSound::~SNMSound | ( | ) | [virtual] |
Destructor.
PLSOUND_API float PLSound::SNMSound::GetVolume | ( | ) | const |
PLSOUND_API void PLSound::SNMSound::SetVolume | ( | float | fValue | ) |
PLSOUND_API float PLSound::SNMSound::GetPitch | ( | ) | const |
PLSOUND_API void PLSound::SNMSound::SetPitch | ( | float | fValue | ) |
PLSOUND_API float PLSound::SNMSound::GetReferenceDistance | ( | ) | const |
PLSOUND_API void PLSound::SNMSound::SetReferenceDistance | ( | float | fValue | ) |
PLSOUND_API float PLSound::SNMSound::GetMaxDistance | ( | ) | const |
PLSOUND_API void PLSound::SNMSound::SetMaxDistance | ( | float | fValue | ) |
PLSOUND_API float PLSound::SNMSound::GetRolloffFactor | ( | ) | const |
PLSOUND_API void PLSound::SNMSound::SetRolloffFactor | ( | float | fValue | ) |
virtual PLSOUND_API void PLSound::SNMSound::SetFlags | ( | PLCore::uint32 | nValue | ) | [override, virtual] |
Reimplemented from PLScene::SceneNodeModifier.
PLSOUND_API Source* PLSound::SNMSound::GetSoundSource | ( | ) | const |
Returns the sound source.
virtual PLSOUND_API void PLSound::SNMSound::OnActivate | ( | bool | bActivate | ) | [override, protected, virtual] |
Called when the scene node modifier has been activated or deactivated.
[in] | bActivate | 'true' if the scene node modifier is now active, else 'false' |
Reimplemented from PLScene::SceneNodeModifier.
PLCore::String PLSound::SNMSound::m_sSound [protected] |
Name of the sound which should be played (full path, supported file formats are API dependent)
float PLSound::SNMSound::m_fVolume [protected] |
Volume (value from 0.0-1.0 -> 0.0 = silence, 1.0 = full volume)
float PLSound::SNMSound::m_fPitch [protected] |
Pitch multiplier (pitch<1.0=slower/pitch=1.0=normal/pitch>1.0=faster)
float PLSound::SNMSound::m_fReferenceDistance [protected] |
Used to increase or decrease the range of a source by decreasing or increasing the attenuation, respectively
float PLSound::SNMSound::m_fMaxDistance [protected] |
Defines a distance beyond which the source will not be further attenuated by distance
float PLSound::SNMSound::m_fRolloffFactor [protected] |
This will scale the distance attenuation over the applicable range
|