CrystalSpace

Public API Reference

iSndSysSource3DDoppler Struct Reference
[Sound system]

Extension to the iSndSysSource3D interface, allowing Doppler shift effects. More...

#include <isndsys/ss_source.h>

Inheritance diagram for iSndSysSource3DDoppler:

List of all members.

Public Member Functions

virtual const csVector3GetVelocity ()=0
 Get velocity (speed) of the source.
virtual void SetVelocity (const csVector3 &Velocity)=0
 Set velocity (speed) of the source.

Detailed Description

Extension to the iSndSysSource3D interface, allowing Doppler shift effects.

The Doppler effect that causes sound sources the change in pitch as their relative velocities change. As an example the siren of an ambulance will increase in pitch as it approaches you, and decrease once it has passed you.

The pitch of a source is multiplied by the value doppler_factor * (speed_of_sound - listener_velocity) / (speed_of_sound + source_velocity) Where the two velocities are the projections of the source and listener velocities, onto the vector between them.

Definition at line 265 of file ss_source.h.


Member Function Documentation

virtual const csVector3& iSndSysSource3DDoppler::GetVelocity (  )  [pure virtual]

Get velocity (speed) of the source.

virtual void iSndSysSource3DDoppler::SetVelocity ( const csVector3 Velocity  )  [pure virtual]

Set velocity (speed) of the source.


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

Generated for Crystal Space 2.1 by doxygen 1.6.1