PixelLightAPI  .
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
PLSound::SNSound Class Reference

Scene node which is able to playback a sound. More...

#include <SNSound.h>

Inheritance diagram for PLSound::SNSound:
Inheritance graph
[legend]

List of all members.

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 SourceGetSoundSource () 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

Detailed Description

Scene node which is able to playback a sound.

Note:
  • For sources with 3D spatialization, do only use one channel buffers because not each sound backend may be capable to use 3D spatialization for buffers with multiple channels

Member Enumeration Documentation

Scene node flags (SceneNode flags extension)

Enumerator:
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.


Constructor & Destructor Documentation

PLSOUND_API PLSound::SNSound::SNSound ( )

Default constructor.

virtual PLSOUND_API PLSound::SNSound::~SNSound ( ) [virtual]

Destructor.


Member Function Documentation

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.

Returns:
The sound source, can be a null pointer
virtual PLSOUND_API void PLSound::SNSound::InitFunction ( ) [override, protected, virtual]

This function is called when the scene node gets initialized.

Reimplemented from PLScene::SceneNode.


Member Data Documentation

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)

Used to increase or decrease the range of a source by decreasing or increasing the attenuation, respectively

Defines a distance beyond which the source will not be further attenuated by distance

This will scale the distance attenuation over the applicable range


The documentation for this class was generated from the following file:


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:26
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported