| OpenAL Specification and Reference | ||
|---|---|---|
| <<< Previous | Listener and Sources | Next >>> |
The Listener Object defines various properties that affect processing of the sound for the actual output. The Listener is unique for an AL Context, and has no Name. By controlling the listener, the application controls the way the user experiences the virtual world, as the listener defines the sampling/pickup point and orientation, and other parameters that affect the output stream.
It is entirely up to the driver and hardware configuration, i.e. the installation of AL as part of the operating system and hardware setup, whether the output stream is generated for headphones or 2 speakers, 4.1 speakers, or other arrangements, whether (and which) HRTF's are applied, etc..
![]() | Annotation (Listener Anatomy) |
|---|---|
The API is ignorant with respect to the real world listener, it does not need to make assumptions on the listening capabilities of the user, its species or its number of ears. It only describes a scene and the position of the listener in this scene. It is the AL implementation that is designed for humans with ears on either side of the head. |
![]() | Annotation (Listener State Evaluation) |
|---|---|
Some Listener state (GAIN) affects only the very last stage of sound synthesis, and is thus applied to the sound stream as sampled at the Listener position. Other Listener state is applied earlier. One example is Listener velocity as used to compute the amount of Doppler pitch-shifting applied to each source: In a typical implementation, pitch-shifting (sample-rate conversion) might be the first stage of the audio processing for each source. |
Several Source attributes also apply to Listener: e.g. POSITION, VELOCITY, GAIN. In addition, some attributes are listener specific.
Table 4. Listener Orientation
| Name | Signature | Values | Default |
|---|---|---|---|
| ORIENTATION | fv | any except NaN | { { 0.0f, 0.0f, -1.0f }, { 0.0f, 1.0f, 0.0f } } |
Listener attributes are changed using the Listener group of commands.
void Listener{n}{sifd}{v} ( enum paramName , T values );
Listener state is maintained inside the AL implementation and can be queried in full. See Querying Object Attributes. The valid values for paramName are identical to the ones for the Listener* command.
void GetListener{sifd}v ( enum param , T * values );
| <<< Previous | Home | Next >>> |
| Listener and Sources | Up | Source Objects |