[−][src]Crate alto
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
efx | |
ext | |
sys |
Structs
ALawSample | |
Alto | 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. |
BFormat2D | |
BFormat3D | |
Buffer | An audio buffer of any format. |
Capture | A capture device from which audio data can be sampled. This is tyically an audio input as reported by the operating system. |
Context | A listener context. |
ContextAttrs | Attributes that may be supplied during context creation. |
DeferLock | An RAII lock that will suspend state updates while held. When this lock is dropped, the context will apply all pending updates. |
Device | A handle to any kind of output device. |
LoopbackAttrs | Attributes that may be supplied during context creation from a loopback device.
Requires |
LoopbackDevice | A loopback device that outputs audio to a memory buffer.
Requires |
Mc51Chn | |
Mc61Chn | |
Mc71Chn | |
McQuad | |
McRear | |
Mono | |
MuLawSample | |
OutputDevice | A regular output device. This is typically a device as reported by the operating system. |
StaticSource | A source that can play a shared static buffer. |
Stereo | |
StreamingSource | A source that plays a queue of owned buffers. |
Enums
AltoError | An error as reported by |
DistanceModel | The gain curve of sources as a function of distance to the listener. |
ExtALawFormat | Formats provided by |
ExtBFormat | Formats provided by |
ExtDoubleFormat | Formats provided by |
ExtFloat32Format | Formats provided by |
ExtIma4Format | Formats provided by |
ExtMcFormat | Formats provided by |
ExtMuLawBFormat | Formats provided by |
ExtMuLawFormat | Formats provided by |
ExtMuLawMcFormat | Formats provided by |
Format | Audio formats supported by OpenAL. |
LoopbackFormatChannels | Channel format for a loopback context.
Requires |
LoopbackFormatType | Sample format for a loopback context.
Requires |
SoftHrtfStatus | The current HRTF mode of a device.
Requires |
SoftMsadpcmFormat | Formats provided by |
SoftSourceSpatialization | The spatialization mode of a source.
Requires |
SourceState | The current playback state of a source. |
StandardFormat | Standard formats defined in the base specification. |
Traits
AsBufferData | Implemented for types that represent a shared buffer of audio data. |
AsBufferDataMut | Implemented for types that represent a mutable buffer of audio data. |
DeviceObject | Common capabilities expoed by both real and loopback devices. |
LoopbackFrame | A sample frame that is supported as a loopback device output format. |
SampleFrame | 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. |
Source | Capabilities common to both static and streaming sources. |
StandardFrame | Implemented for sample frames specified by the base standard. |
Type Definitions
AltoResult |