View on GitHub

DSFML

dsfml.audio.listener



abstract class Listener;
The audio listener is the point in the scene from where all the sounds are heard.

The audio listener defines the global properties of the audio environment, it defines where and how sounds and musics are heard.

If View is the eyes of the user, then Listener is his ears (by the way, they are often linked together – same position, orientation, etc.).

Listener is a simple interface, which allows to setup the listener in the 3D audio environment (position and direction), and to adjust the global volume.

Because the listener is unique in the scene, Listener only contains static functions and doesn't have to be instanciated.

See Also:


http:
//www.sfml-dev.org/documentation/2.0/classsf_1_1Listener.php#details

Authors:
Laurent Gomila, Jeremy DeHaan

static @property void Direction(Vector3f orientation);
The orientation of the listener in the scene. The orientation defines the 3D axes of the listener (left, up, front) in the scene. The orientation vector doesn't have to be normalized.

The default listener's orientation is (0, 0, -1).

static @property Vector3f Direction();
The orientation of the listener in the scene. The orientation defines the 3D axes of the listener (left, up, front) in the scene. The orientation vector doesn't have to be normalized.

The default listener's orientation is (0, 0, -1).

static @property void GlobalVolume(float volume);
The global volume of all the sounds and musics. The volume is a number between 0 and 100; it is combined with the individual volume of each sound / music.

The default value for the volume is 100 (maximum).

static @property float GlobalVolume();
The global volume of all the sounds and musics. The volume is a number between 0 and 100; it is combined with the individual volume of each sound / music.

The default value for the volume is 100 (maximum).

static @property void Position(Vector3f position);
The position of the listener in the scene.

The default listener's position is (0, 0, 0).

static @property Vector3f Position();
The position of the listener in the scene.

The default listener's position is (0, 0, 0).