OpenAL

format_list_bulleted Contenido keyboard_arrow_down
ImprimirCitar

Open Audio Library is a cross-platform audio API developed by Creative Labs for efficient rendering of positional and multi-channel audio in three dimensions. It is designed for use in video games and the style and Microsoft Xbox and PCM format, either in 8 or 16 bits, in mono or stereo format. The rendering engine takes care of all the necessary calculations like attenuation, doppler, etc.

Main concepts

To understand the proper functioning of the library, a series of very important concepts must be defined:

Sound buffer

A sound buffer is a space in memory (usually in the computer's main memory, or sound card memory) used to store the bytes representing a sound stored on the computer. Generally, it is an encoding of a certain sound, using a digital encoding.

Sources

A source or origen (translated literally) is what is known as a sound emitter. It is characterized by encapsulating a sound (reproducing it), having a 3D position in the world, a speed, a volume, a frequency, etc. It is one of the most important structures of OpenAL, since it allows the reception of sounds with effects, such as the Doppler effect.

As an important detail, a 3D emitter will only be able to correctly emit sounds of the [MONO] type, with a single reproduction channel. The attributes of a sound can be changed at any time while it is playing, and the sound will be affected by these changes.

Listener

In every communication system there must be a sender (source), a channel (air simulation, in this case) and, of course, a receiver. In the case of OpenAL, the receiver or listener is called the listener.

Like an emitter, a receiver has a series of main characteristics, such as a position, a direction, a speed and a gain. Unfortunately, OpenAL only accepts one listener per OpenAL context. In case you want to play a sound from different listeners, it will be necessary to create a context for each listener, and change it dynamically.

As with the emitters or sources, the changes made to the different parameters of a listener will be reflected in terms of listening to the sound, in real time.

Queues or queues for streaming

OpenAL allows the creation of Queues or queues to introduce sounds and play them continuously, as if it were streaming.

OpenAL tail operation

It can be very useful when the sound to be played is too large (say, 2 hours of HD recording), so it will not be possible to save the entire file in a buffer, and play it as is. Therefore, it is necessary to partition the original sound, and play each fragment, and release those already played.

In addition, it should be noted that it is a queue of buffers, and not of sources or emitters. Each fragment extracted from the original sound will be reproduced in an orderly manner according to its position in the queue, and under the established characteristics (position, gain...) for the transmitter to which the queue has been assigned.

You can also use the library and these queues to capture sound with an input device (microphone...) and play it continuously, each fragment being a small amount of recorded audio.

Games using OpenAL

  • Based on Id Software engines
    • Doom 3
    • Jedi Knight II: Jedi Outcast
    • Jedi Knight: Jedi Academy
    • Quake 4
    • Prey
    • Tremulous
  • Based on Unreal Engines
    • Unreal 2
    • Unreal Tournament 2003
    • Unreal Tournament 2004
    • Unreal Tournament 3
    • Postal 2
    • America's Army
    • Hitman 2: Silent Assassin
  • Other
    • Battlefield 2
    • Freedom Fighters
    • Psychonauts
    • Armed Assault
    • Race Driver GRID
    • Regnum Online
    • SuperTux 0.3.x
    • SuperTuxKart
    • Penumbra Overture
    • Assault Cube
    • Mercenary Kings
    • Minecraft

Contenido relacionado

Smarty

Smarty is a templating engine for PHP, that is, it separates PHP code, such as business logic, from HTML code, such as presentation logic, and generates web...

Lime mortar

The lime mortars are those mortars that are made with lime, sand and...

Cyc

Cyc is an artificial intelligence project that attempts to assemble a comprehensive ontology and database of general knowledge in order to enable artificial...
Más resultados...
Tamaño del texto:
undoredo
format_boldformat_italicformat_underlinedstrikethrough_ssuperscriptsubscriptlink
save