PixelLightAPI
.
|
Scene node which is able to playback a sound. More...
#include <SNSound.h>
Public Types | |
enum | EFlags { Stream = 1<<10, No3D = 1<<11, NoLoop = 1<<12, NoStartPlayback = 1<<13 } |
Scene node flags (SceneNode 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 | SNSound () |
Default constructor. | |
virtual PLSOUND_API | ~SNSound () |
Destructor. | |
PLSOUND_API Source * | GetSoundSource () const |
Returns the sound source. | |
Protected Member Functions | |
virtual PLSOUND_API void | InitFunction () override |
This function is called when the scene node gets initialized. | |
Protected Attributes | |
PLCore::String | m_sSound |
float | m_fVolume |
float | m_fPitch |
float | m_fReferenceDistance |
float | m_fMaxDistance |
float | m_fRolloffFactor |
Scene node which is able to playback a sound.
Scene node flags (SceneNode 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::SceneNode.
PLSOUND_API PLSound::SNSound::SNSound | ( | ) |
Default constructor.
virtual PLSOUND_API PLSound::SNSound::~SNSound | ( | ) | [virtual] |
Destructor.
PLSOUND_API float PLSound::SNSound::GetVolume | ( | ) | const |
PLSOUND_API void PLSound::SNSound::SetVolume | ( | float | fValue | ) |
PLSOUND_API float PLSound::SNSound::GetPitch | ( | ) | const |
PLSOUND_API void PLSound::SNSound::SetPitch | ( | float | fValue | ) |
PLSOUND_API float PLSound::SNSound::GetReferenceDistance | ( | ) | const |
PLSOUND_API void PLSound::SNSound::SetReferenceDistance | ( | float | fValue | ) |
PLSOUND_API float PLSound::SNSound::GetMaxDistance | ( | ) | const |
PLSOUND_API void PLSound::SNSound::SetMaxDistance | ( | float | fValue | ) |
PLSOUND_API float PLSound::SNSound::GetRolloffFactor | ( | ) | const |
PLSOUND_API void PLSound::SNSound::SetRolloffFactor | ( | float | fValue | ) |
virtual PLSOUND_API void PLSound::SNSound::SetFlags | ( | PLCore::uint32 | nValue | ) | [override, virtual] |
Reimplemented from PLScene::SceneNode.
PLSOUND_API Source* PLSound::SNSound::GetSoundSource | ( | ) | const |
Returns the sound source.
virtual PLSOUND_API void PLSound::SNSound::InitFunction | ( | ) | [override, protected, virtual] |
This function is called when the scene node gets initialized.
Reimplemented from PLScene::SceneNode.
PLCore::String PLSound::SNSound::m_sSound [protected] |
Filename of the sound which should be played (full path, supported file formats are API dependent)
float PLSound::SNSound::m_fVolume [protected] |
Volume (value from 0.0-1.0 -> 0.0 = silence, 1.0 = full volume)
float PLSound::SNSound::m_fPitch [protected] |
Pitch multiplier (pitch<1.0=slower/pitch=1.0=normal/pitch>1.0=faster)
float PLSound::SNSound::m_fReferenceDistance [protected] |
Used to increase or decrease the range of a source by decreasing or increasing the attenuation, respectively
float PLSound::SNSound::m_fMaxDistance [protected] |
Defines a distance beyond which the source will not be further attenuated by distance
float PLSound::SNSound::m_fRolloffFactor [protected] |
This will scale the distance attenuation over the applicable range
|