Expand description
§Overview
Alto is an idiomatic wrapper for the OpenAL 3D audio API and associated extensions (including EFX). This documentation does not describe how to use the OpenAL API itself, but rather explains how it has been adapted for rust and provides the native symbols associated with each function so they can be cross-referenced with the official OpenAL documentation for full details.
The core of the API is the Alto
struct. It has no analog in raw OpenAL and
represents an implementation of the API itself. From there, instances of familiar OpenAL objects
can be instantiated.
§WARNING
Because Alto interacts with global C state via dynamic linking, having multiple versions of Alto in one project could lead to unsafety. Please make sure only one version of Alto is in your dependency tree at any given time.
Modules§
Structs§
- This struct is the entry point of the API. Instantiating it will load an OpenAL implementation. From here, available devices can be queried and opened.
- An audio buffer of any format.
- A capture device from which audio data can be sampled. This is tyically an audio input as reported by the operating system.
- A listener context.
- Attributes that may be supplied during context creation.
- An RAII lock that will suspend state updates while held. When this lock is dropped, the context will apply all pending updates.
- A handle to any kind of output device.
- Attributes that may be supplied during context creation from a loopback device. Requires
ALC_SOFT_loopback
- A loopback device that outputs audio to a memory buffer. Requires
ALC_SOFT_loopback
- A regular output device. This is typically a device as reported by the operating system.
- A source that can play a shared static buffer.
- A source that plays a queue of owned buffers.
Enums§
- An error as reported by
alcGetError
oralGetError
, plus some Alto specific variants. - The gain curve of sources as a function of distance to the listener.
- Formats provided by
AL_EXT_ALAW
. - Formats provided by
AL_EXT_BFORMAT
. - Formats provided by
AL_EXT_double
. - Formats provided by
AL_EXT_float32
. - Formats provided by
AL_EXT_IMA4
. - Formats provided by
AL_EXT_MCFORMATS
. - Formats provided by
AL_EXT_MULAW_BFORMAT
. - Formats provided by
AL_EXT_MULAW
. - Formats provided by
AL_EXT_MULAW_MCFORMATS
. - Audio formats supported by OpenAL.
- Channel format for a loopback context. Requires
ALC_SOFT_loopback
- Sample format for a loopback context. Requires
ALC_SOFT_loopback
- The current HRTF mode of a device. Requires
ALC_SOFT_HRTF
- Formats provided by
AL_SOFT_MSADPCM
. - The spatialization mode of a source. Requires
ALC_SOFT_source_spatialization
- The current playback state of a source.
- Standard formats defined in the base specification.
Traits§
- Implemented for types that represent a shared buffer of audio data.
- Implemented for types that represent a mutable buffer of audio data.
- Common capabilities expoed by both real and loopback devices.
- A sample frame that is supported as a loopback device output format.
- Implemented by structs that represent a frame of audio samples. A sample frame is a grouping of audio samples from each channel of an output format.
- Capabilities common to both static and streaming sources.
- Implemented for sample frames specified by the base standard.