Audaspace 1.5.0
A high level audio library.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Source Class Reference

This class stores the azimuth and elevation angles of a sound and allows to change them dynamically. More...

#include <Source.h>

Public Member Functions

 Source (float azimuth, float elevation, float distance=0.0)
 Creates a Source instance with an initial value.
 
float getAzimuth ()
 Retrieves the current azimuth value.
 
float getElevation ()
 Retrieves the current elevation value.
 
float getDistance ()
 Retrieves the current distance value.
 
float getVolume ()
 Retrieves the current volume value based on the distance.
 
void setAzimuth (float azimuth)
 Changes the azimuth value.
 
void setElevation (float elevation)
 Changes the elevation value.
 
void setDistance (float distance)
 Changes the distance value.
 

Detailed Description

This class stores the azimuth and elevation angles of a sound and allows to change them dynamically.

The azimuth angle goes clockwise. For a sound source situated at the right of the listener the azimuth angle is 90.

Constructor & Destructor Documentation

◆ Source()

Source::Source ( float azimuth,
float elevation,
float distance = 0.0 )

Creates a Source instance with an initial value.

Parameters
azimuthThe value of the azimuth.
elevationThe value of the elevation.
distanceThe distance from the listener. Max distance is 1, min distance is 0.

Member Function Documentation

◆ getAzimuth()

float Source::getAzimuth ( )

Retrieves the current azimuth value.

Returns
The current azimuth.

◆ getDistance()

float Source::getDistance ( )

Retrieves the current distance value.

Returns
The current distance.

◆ getElevation()

float Source::getElevation ( )

Retrieves the current elevation value.

Returns
The current elevation.

◆ getVolume()

float Source::getVolume ( )

Retrieves the current volume value based on the distance.

Returns
The current volume based on the Distance.

◆ setAzimuth()

void Source::setAzimuth ( float azimuth)

Changes the azimuth value.

Parameters
azimuthThe new value for the azimuth.

◆ setDistance()

void Source::setDistance ( float distance)

Changes the distance value.

Parameters
distanceThe new value for the distance. Max distance is 1, min distance is 0.

◆ setElevation()

void Source::setElevation ( float elevation)

Changes the elevation value.

Parameters
elevationThe new value for the elevation.

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