CSFML

- Main Page
- Data Structures
- Files

- File List
- Globals

Functions
Listener.h File Reference
`#include <SFML/Audio/Export.h>`
`#include <SFML/System/Vector3.h>`

Go to the source code of this file.

## Functions

CSFML_AUDIO_API void | sfListener_setGlobalVolume (float volume)
| Change the global volume of all the sounds and musics. More...
CSFML_AUDIO_API float | sfListener_getGlobalVolume (void)
| Get the current value of the global volume. More...
CSFML_AUDIO_API void | sfListener_setPosition (sfVector3f position)
| Set the position of the listener in the scene. More...
CSFML_AUDIO_API sfVector3f | sfListener_getPosition ()
| Get the current position of the listener in the scene. More...
CSFML_AUDIO_API void | sfListener_setDirection (sfVector3f orientation)
| Set the orientation of the listener in the scene. More...
CSFML_AUDIO_API sfVector3f | sfListener_getDirection ()
| Get the current orientation of the listener in the scene. More...

## Function Documentation

CSFML_AUDIO_API sfVector3f sfListener_getDirection | ( |  | ) |

Get the current orientation of the listener in the scene.

Returns
  The listener's direction

CSFML_AUDIO_API float sfListener_getGlobalVolume | ( | void |  | ) |

Get the current value of the global volume.

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

CSFML_AUDIO_API sfVector3f sfListener_getPosition | ( |  | ) |

Get the current position of the listener in the scene.

Returns
  The listener's position

CSFML_AUDIO_API void sfListener_setDirection | ( | sfVector3f | orientation | ) |

Set 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).

Parameters

  position | New direction of the listener

CSFML_AUDIO_API void sfListener_setGlobalVolume | ( | float | volume | ) |

Change 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).

Parameters

  volume | New global volume, in the range [0, 100]

CSFML_AUDIO_API void sfListener_setPosition | ( | sfVector3f | position | ) |

Set the position of the listener in the scene.

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

Parameters

  position | New position of the listener