PrevUpHomeNext

Listener

Listener is an AL context-specific monostate object representing the listener.

#include <oalplus/listener.hpp>

Helper classes

struct ListenerOrientation
{
	ListenerOrientation(const Vec3f& at, const Vec3f& up)
	noexcept;

	Vec3f At(void) const
	noexcept;

	Vec3f Up(void) const
	noexcept;
};

Listener operations

class Listener
{
public:
	static void Position(const Vec3f& position); 1
	static void Position(ALfloat x, ALfloat y, ALfloat z);
	static Vec3f Position(void); 2

	static void Velocity(const Vec3f& velocity); 3
	static void Velocity(ALfloat x, ALfloat y, ALfloat z);
	static Vec3f Velocity(void); 4

	static void Orientation(const ListenerOrientation& orientation); 5
	static void Orientation(const Vec3f& at, const Vec3f& up);
	static void Orientation(
		ALfloat at_x,
		ALfloat at_y,
		ALfloat at_z,
		ALfloat up_x,
		ALfloat up_y,
		ALfloat up_z
	);

	static ListenerOrientation Orientation(void); 6
	static Vec3f OrientationAt(void);
	static Vec3f OrientationUp(void);

	static void Gain(ALfloat value); 7
	static ALfloat Gain(void); 8
};

1

Specifies the position of the listener. See alListenerfv, AL_POSITION.

2

Returns the position of the listener. See alGetListenerfv, AL_POSITION.

3

Specifies the velocity of the listener. See alListenerfv, AL_VELOCITY.

4

Returns the velocity of the listener. See alGetListenerfv, AL_VELOCITY.

5

Specifies the orientation vectors of the listener. See alListenerfv, AL_ORIENTATION.

6

Return the orientation vectors of the listener. See alGetListenerfv, AL_ORIENTATION.

7

Specifies the value of gain of the listener. See alListenerf, AL_GAIN.

8

Returns the current value of gain of the listener. See alGetListenerfv, AL_GAIN.


PrevUpHomeNext