Cafu Engine
SoundSysI Class Referenceabstract

This is an interface to the sound system. More...

#include "SoundSys.hpp"

Inheritance diagram for SoundSysI:

Public Member Functions

virtual bool Initialize ()=0
 Initializes the sound system. More...
 
virtual void Release ()=0
 Releases the sound system and removes all sound data from memory. More...
 
virtual bool IsSupported ()=0
 Determine if the sound system is supported on this platform. More...
 
virtual int GetPreferenceNr ()=0
 Returns the preference number for this sound system, so calling code can decide which sound system to use. More...
 
virtual SoundICreateSound2D (const SoundShaderT *SoundShader)=0
 Creates a 2 dimensional sound object using the properties of the passed sound shader. More...
 
virtual SoundICreateSound3D (const SoundShaderT *SoundShader)=0
 Creates a 3 dimensional sound object using the properties of the passed sound shader. More...
 
virtual void DeleteSound (SoundI *Sound)=0
 Deletes a previously created sound object. More...
 
virtual bool PlaySound (const SoundI *Sound)=0
 Plays a sound on a channel. More...
 
virtual void SetMasterVolume (float Volume)=0
 Sets the master volume for this sound system. More...
 
virtual float GetMasterVolume ()=0
 Gets the master volume currently set for this sound system. More...
 
virtual void UpdateListener (const Vector3dT &Position, const Vector3dT &Velocity, const Vector3fT &OrientationForward, const Vector3fT &OrientationUp)=0
 Updates the position, velocity and orientation of the listener. More...
 
virtual void Update ()=0
 Upates all channels that are currently being played according to the properties of their sound object. More...
 
virtual ~SoundSysI ()
 The virtual destructor makes sure that deleting derived classes via a SoundSysI pointer works properly. More...
 

Detailed Description

This is an interface to the sound system.

The interface is specified as ABC in order to be able to share the sound system across exe/dll boundaries.

Constructor & Destructor Documentation

virtual SoundSysI::~SoundSysI ( )
inlinevirtual

The virtual destructor makes sure that deleting derived classes via a SoundSysI pointer works properly.

Member Function Documentation

virtual SoundI* SoundSysI::CreateSound2D ( const SoundShaderT SoundShader)
pure virtual

Creates a 2 dimensional sound object using the properties of the passed sound shader.

Parameters
SoundShaderSound shader to use with this sound object.

Implemented in SoundSysImplT.

virtual SoundI* SoundSysI::CreateSound3D ( const SoundShaderT SoundShader)
pure virtual

Creates a 3 dimensional sound object using the properties of the passed sound shader.

Parameters
SoundShaderSound shader to use with this sound object.

Implemented in SoundSysImplT.

virtual void SoundSysI::DeleteSound ( SoundI Sound)
pure virtual

Deletes a previously created sound object.

Parameters
SoundThe sound object to delete.

Implemented in SoundSysImplT.

virtual float SoundSysI::GetMasterVolume ( )
pure virtual

Gets the master volume currently set for this sound system.

Returns
The current master volume [0, 1].

Implemented in SoundSysImplT.

virtual int SoundSysI::GetPreferenceNr ( )
pure virtual

Returns the preference number for this sound system, so calling code can decide which sound system to use.

Returns
Preference number.

Implemented in SoundSysImplT.

virtual bool SoundSysI::Initialize ( )
pure virtual

Initializes the sound system.

Implemented in SoundSysImplT.

virtual bool SoundSysI::IsSupported ( )
pure virtual

Determine if the sound system is supported on this platform.

Returns
Whether or not the sound system is supported.

Implemented in SoundSysImplT.

virtual bool SoundSysI::PlaySound ( const SoundI Sound)
pure virtual

Plays a sound on a channel.

Parameters
SoundThe sound object that should be played.
Returns
true if sound is played on a channel, false if no channel was free (and playing sound have all greater priority than this sound).

Implemented in SoundSysImplT.

virtual void SoundSysI::Release ( )
pure virtual

Releases the sound system and removes all sound data from memory.

Implemented in SoundSysImplT.

virtual void SoundSysI::SetMasterVolume ( float  Volume)
pure virtual

Sets the master volume for this sound system.

Parameters
VolumeThe new master volume. Value has to be 0, 1.

Implemented in SoundSysImplT.

virtual void SoundSysI::Update ( )
pure virtual

Upates all channels that are currently being played according to the properties of their sound object.

Implemented in SoundSysImplT.

virtual void SoundSysI::UpdateListener ( const Vector3dT Position,
const Vector3dT Velocity,
const Vector3fT OrientationForward,
const Vector3fT OrientationUp 
)
pure virtual

Updates the position, velocity and orientation of the listener.

Parameters
PositionPosition of the listener in the 3D Space.
VelocityVelocity of the listener.
OrientationForwardForward orientation of the listener (unit length vector).
OrientationUpUpwards orientation of the listener (unit length vector).

Implemented in SoundSysImplT.


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