Crate alto [−] [src]
Overview
Alto is an idiomatic wrapper for the OpenAL 3D audio API and associated extensions (EFX support is still WIP). This documentation will describe how the API was adapted for rust, but for more general information about OpenAL, the official documentation should be consulted.
The core of the API is the Alto
struct. From this struct audio
devices can be enumerated and opened. Once a Device
or
LoopbackDevice
is opened, a Context
can be created from it. The context governs properties of the listener and allows you to
allocate audio Buffer
s. These buffers can then be played with either
a StaticSource
or StreamingSource
,
which are also allocated from the context.
Modules
ext | |
sys |
Structs
ALawSample | |
Alto |
This struct is the entry point of the API. Instantiating it will load an OpenAL implementation dynamically. From here, available devices can be queried and opened. |
BFormat2D | |
BFormat3D | |
Buffer |
A buffer containing audio data of any supported format. |
CaptureDevice |
A capture device from which audio data can be sampled. This is tyically an audio input as reported by the operating system. |
Context | |
ContextAttrs |
Attributes that may be supplied during context creation. |
Device |
An audio device as exposed by the OpenAL implementation. This will typically be a device endpoint as reported by the operating system. |
LoopbackAttrs |
Attributes that may be supplied during context creation from a loopback device. |
LoopbackDevice |
A loopback device as provided by the |
Mc51Chn | |
Mc61Chn | |
Mc71Chn | |
McQuad | |
McRear | |
Mono | |
MuLawSample | |
SoftPauseLock |
An RAII guard that keeps a device paused. When this lock is dropped, the device will resume playback. |
StaticSource |
A source that can play shared static buffer. |
Stereo | |
StreamingSource |
A source that plays a queue of owned buffers. |
SuspendLock |
An RAII lock that will suspend state updates while held. When this lock is droopped, the context will apply all pending updates. |
Enums
AltoError |
An error as reported by |
DistanceModel |
The shape of the volume curve for 3D positional audio. |
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. |
LoopbackFormatType |
Sample format for a loopback context. |
SoftHrtfStatus |
The current HRTF mode of a device. |
SoftMsadpcmFormat |
Formats provided by |
SourceState |
Playstack state of a source. |
StandardFormat |
Standard formats defined in the base specification. |
Traits
AsBufferData | |
AsBufferDataMut | |
Block | |
DeviceTrait |
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. |
SourceTrait |
Capabilities common to both static and streaming sources. |
StandardFrame |
Implemented for sample frames specified by the base standard. |
Type Definitions
AltoResult |