dsfml.audio.listener



class Listener;
Listener is a global interface for defining the audio listener properties ; the audio listener is the point in the scene from where all the sounds are heard.

See Also:
SFML Tutorial for sound spatialization example.

static void setGlobalVolume(float Volume);
Change the global volume of all the sounds. The default volume is 100

Params:
volume New global volume, in the range [0, 100]

static float getGlobalVolume();
Get the current value of the global volume of all the sounds

Returns:
Current global volume, in the range [0, 100]

static void setPosition(float posX, float posY, float posZ);
Change the position of the listener. The default position is (0, 0, 0)

Params:
float posX X position of the listener in the world
float posY Y position of the listener in the world
float posZ Z position of the listener in the world

static void setPosition(Vector3!(float) position);
Change the position of the listener. The default position is (0, 0, 0)

Params:
Vector3!(float) position new position

static Vector3!(float) getPosition(Vector3!(float) position);
Get the current position of the listener

Returns:
Current position

static void setTarget(float targetX, float targetY, float targetZ);
Change the orientation of the listener (the point he must look at). The default target is (0, 0, -1)

Params:
float targetX X position of the point the listener must look at
float targetY X position of the point the listener must look at
float targetZ X position of the point the listener must look at

static void setTarget(Vector3!(float) position);
Change the orientation of the listener (the point he must look at). The default target is (0, 0, -1)

Params:
target Position of the point the listener must look at

static Vector3!(float) getTarget();
Get the current orientation of the listener (the point he's looking at)

Returns:
Position of the point the listener is looking at


Page generated by Ddoc.