Next: , Previous: , Up: Audio   [Contents][Index]

2.4.3 The Listener

The listener is a collection of global state that represents the player within the 3D sound model. For games that do not need 3D sound modeling, manipulating the listener’s master volume is the only interesting thing to do here.

Procedure: listener-volume

Return the current master volume of the listener.

Procedure: listener-position

Return the current position of the listener.

Procedure: listener-velocity

Return the current velocity of the listener.

Procedure: listener-orientation

Return the current orientation of the listener.

Procedure: set-listener-volume! volume

Set the listener’s master volume to volume, a value in the range [0, 1].

Procedure: set-listener-position! position

Set the listener’s position to the 3D vector position.

Procedure: set-listener-velocity! velocity

Set the listener’s velocity to the 3D vector velocity.

Procedure: set-listener-orientation! at up

Set the listener’s orientation to the 3D vectors at and up.