"L. Spiro Engine"
Public Member Functions | Protected Member Functions | Protected Attributes | Friends

lss::CSoundListener Class Reference

The listener hears all the sounds in the world. More...

#include <LSSSoundListener.h>

List of all members.

Public Member Functions

const CVector3 &LSE_CALL GetPos () const
LSVOID LSE_CALL SetPos (const CVector3 &_vPos)
const CVector3 &LSE_CALL GetVel () const
LSVOID LSE_CALL SetVel (const CVector3 &_vVel)
const CVector3 &LSE_CALL GetForward () const
const CVector3 &LSE_CALL GetUp () const
LSVOID LSE_CALL SetOrientation (const CVector3 &_vFor, const CVector3 &_vUp)
LSSREAL LSE_CALL GetGain () const
LSVOID LSE_CALL SetGain (LSSREAL _fGain)
LSVOID LSE_CALL Tick ()

Protected Member Functions

LSBOOL LSE_CALL Update ()
LSBOOL LSE_CALL DeviceActivated ()
LSVOID LSE_CALL DeviceWillClose ()

Protected Attributes

CVector3 m_vPos
CVector3 m_vForwardDir
CVector3 m_vUpDir
CVector3 m_vVel
LSSREAL m_fGain
LSBOOL m_bDirty

Friends

class CSoundManager

Detailed Description

The listener hears all the sounds in the world.

Class CSoundListener Description: The listener hears all the sounds in the world. There is only one listener in the game at a time. The gain property controls the master volume of all sound in the game.


Member Function Documentation

LSBOOL LSE_CALL lss::CSoundListener::DeviceActivated ( ) [protected]

Notifies us that the given device has become active and we should send our buffer to it. A return of false from this function indicates the buffer could not be uploaded. This is considered a critical error by the engine.

Returns:
Returns true if the buffer could be reloaded.
LSVOID LSE_CALL lss::CSoundListener::DeviceWillClose ( ) [protected]

Notifies us that the device is about to be lost (changed). We need to sever our connections to it, although we may retain our data/ settings.

const CVector3& LSE_CALL lss::CSoundListener::GetForward ( ) const

Get our forward orientation value.

Returns:
Returns the forward orientation value of the listener.
LSSREAL LSE_CALL lss::CSoundListener::GetGain ( ) const

Get our gain (volume).

Returns:
Returns the gain of the listener.
const CVector3& LSE_CALL lss::CSoundListener::GetPos ( ) const

Get our position.

Returns:
Returns the position of the listener.
const CVector3& LSE_CALL lss::CSoundListener::GetUp ( ) const

Get our up orientation value.

Returns:
Returns the up orientation value of the listener.
const CVector3& LSE_CALL lss::CSoundListener::GetVel ( ) const

Get our velocity.

Returns:
Returns the velocity of the listener.
LSVOID LSE_CALL lss::CSoundListener::SetGain ( LSSREAL  _fGain)

Set our gain (volume).

Parameters:
_fGainThe new gain value.
LSVOID LSE_CALL lss::CSoundListener::SetOrientation ( const CVector3 &  _vFor,
const CVector3 &  _vUp 
)

Set our orientation using forward/up vectors.

Parameters:
_vForForward vector.
_vUpUp vector.
LSVOID LSE_CALL lss::CSoundListener::SetPos ( const CVector3 &  _vPos)

Set our position.

Parameters:
_vPosPosition to set.
LSVOID LSE_CALL lss::CSoundListener::SetVel ( const CVector3 &  _vVel)

Set our velocity.

Parameters:
_vVelVelocity to set.
LSVOID LSE_CALL lss::CSoundListener::Tick ( )

Update the listener. Just updates the hardware/sound system if dirty and clears the dirty flag.

LSBOOL LSE_CALL lss::CSoundListener::Update ( ) [protected]

Update our data. Send it to the hardware or sound system.

Returns:
Returns true if there are no errors related to the sound system after the update.

Member Data Documentation

LSBOOL lss::CSoundListener::m_bDirty [protected]

Dirty flag indicating we need to update on the next tick.

LSSREAL lss::CSoundListener::m_fGain [protected]

Our gain (volume). 0 = nothing. 1 = full volume.

CVector3 lss::CSoundListener::m_vForwardDir [protected]

Our forward direction. -Z = forward.

CVector3 lss::CSoundListener::m_vPos [protected]

Our position.

CVector3 lss::CSoundListener::m_vUpDir [protected]

Our up direction. Y = up.

CVector3 lss::CSoundListener::m_vVel [protected]

Our velocity.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator