version 3.3

VRS::SOUND::DistanceModelAL Class Reference

#include <vrs/openal/distancemodelal.h>

Inheritance diagram for VRS::SOUND::DistanceModelAL:

VRS::MonoAttribute VRS::Attribute VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

Public Types

enum  Model {
  NONE = AL_NONE, INVERSE_DISTANCE = AL_INVERSE_DISTANCE, INVERSE_DISTANCE_CLAMPED = AL_INVERSE_DISTANCE_CLAMPED, LINEAR_DISTANCE = AL_LINEAR_DISTANCE,
  LINEAR_DISTANCE_CLAMPED = AL_LINEAR_DISTANCE_CLAMPED, EXPONENT_DISTANCE = AL_EXPONENT_DISTANCE, EXPONENT_DISTANCE_CLAMPED = AL_EXPONENT_DISTANCE_CLAMPED
}

Public Member Functions

 VRS_SERIALIZABLE_CLASS_ENUM (Model)
 DistanceModelAL (Model model, bool enabled=true)
void setModel (Model model)
Model getModel (void) const
 VRS_TYPEINFO (DistanceModelAL, MonoAttribute)
 VRS_SERIALIZABLE (DistanceModelAL)

Protected Member Functions

 DistanceModelAL (void)


Member Enumeration Documentation

Enumerator:
NONE 
INVERSE_DISTANCE 
INVERSE_DISTANCE_CLAMPED 
LINEAR_DISTANCE 
LINEAR_DISTANCE_CLAMPED 
EXPONENT_DISTANCE 
EXPONENT_DISTANCE_CLAMPED 


Constructor & Destructor Documentation

VRS::SOUND::DistanceModelAL::DistanceModelAL ( Model  model,
bool  enabled = true 
)

OpenAL does not define the units of measurement for distances. The application is free to use its own units, for example, meters, inches, or parsecs. OpenAL provides means for simulating the natural attenuation of sound according to distance, and to exaggerate or reduce this effect. However, the resulting effects do not depend on the distance unit used by the application to express source and listener coordinates. OpenAL calculations are scale invariant.

The specification assumes Euclidean calculation of distances, and mandates that if two sources are sorted with respect to the Euclidean metric, the distance calculation used by the implementation has to preserve that order.

VRS::SOUND::DistanceModelAL::DistanceModelAL ( void   )  [protected]


Member Function Documentation

VRS::SOUND::DistanceModelAL::VRS_SERIALIZABLE_CLASS_ENUM ( Model   ) 

void VRS::SOUND::DistanceModelAL::setModel ( Model  model  ) 

Set/get the distance model. Samples usually use the entire dynamic range of the chosen format/encoding, independent of their real world intensity. For example, a jet engine and a clockwork both will have samples with full amplitude. The application will then have to adjust source gain accordingly to account for relative differences.

Source gain is then attenuated by distance. The effective attenuation of a source depends on many factors, among which distance attenuation and source and listener gain are only some of the contributing factors. Even if the source and listener gain exceed 1.0 (amplification beyond the guaranteed dynamic range), distance and other attenuation might ultimately limit the overall gain to a value below 1.0.

OpenAL currently supports three modes of operation with respect to distance attenuation, including one that is similar to the IASIG I3DL2 model. The application can choose one of these models (or chooses to disable distance-dependent attenuation) on a per-context basis.

Model VRS::SOUND::DistanceModelAL::getModel ( void   )  const [inline]

VRS::SOUND::DistanceModelAL::VRS_TYPEINFO ( DistanceModelAL  ,
MonoAttribute   
)

VRS::SOUND::DistanceModelAL::VRS_SERIALIZABLE ( DistanceModelAL   ) 


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

Generated on Sat May 18 06:00:39 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact