Crate alto [] [src]

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.

Modules

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.

AutowahEffect

AL_EFFECT_AUTOWAH

AuxEffectSlot

An auxiliary effect slot as provided by EFX.

BFormat2D
BFormat3D
BandpassFilter

AL_FILTER_BANDPASS

Buffer

An audio buffer of any format.

CaptureDevice

A capture device from which audio data can be sampled. This is tyically an audio input as reported by the operating system.

ChorusEffect

AL_EFFECT_CHORUS

CompressorEffect

AL_EFFECT_COMPRESSOR

Context

A listener context.

ContextAttrs

Attributes that may be supplied during context creation.

DedicatedDialogueEffect

AL_EFFECT_DEDICATED_DIALOGUE Requires ALC_EXT_DEDICATED

DedicatedLowFrequencyEffect

AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT Requires ALC_EXT_DEDICATED

Device

A regular output device. This is typically a device as reported by the operating system.

DistortionEffect

AL_EFFECT_DISTORTION

EaxReverbEffect

AL_EFFECT_EAXREVERB

EaxReverbProperties

Represents a preset for the AL_EFFECT_REVERB and AL_EFFECT_EAXREVERB effects.

EchoEffect

AL_EFFECT_ECHO

EqualizerEffect

AL_EFFECT_EQUALIZER

FlangerEffect

AL_EFFECT_FLANGER

FrequencyShifterEffect

AL_EFFECT_FREQUENCY_SHIFTER

HighpassFilter

AL_FILTER_HIGHPASS

LoopbackAttrs

Attributes that may be supplied during context creation from a loopback device. Requires ALC_SOFT_loopback

LoopbackDevice

A loopback device that outputs audio to a memory buffer. Requires ALC_SOFT_loopback

LowpassFilter

AL_FILTER_LOWPASS

Mc51Chn
Mc61Chn
Mc71Chn
McQuad
McRear
Mono
MuLawSample
PitchShifterEffect

AL_EFFECT_PITCH_SHIFTER

ReverbEffect

AL_EFFECT_REVERB

RingModulatorEffect

AL_EFFECT_RING_MODULATOR

SoftHints

Configuration hints for OpenAL-Soft.

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 a 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 dropped, the context will apply all pending updates.

VocalMorpherEffect

AL_EFFECT_VOCAL_MORPHER

Enums

AltoError

An error as reported by alcGetError or alGetError.

ChorusWaveform
DistanceModel

The gain curve of sources as a function of distance to the listener.

ExtALawFormat

Formats provided by AL_EXT_ALAW.

ExtBFormat

Formats provided by AL_EXT_BFORMAT.

ExtDoubleFormat

Formats provided by AL_EXT_double.

ExtFloat32Format

Formats provided by AL_EXT_float32.

ExtIma4Format

Formats provided by AL_EXT_IMA4.

ExtMcFormat

Formats provided by AL_EXT_MCFORMATS.

ExtMuLawBFormat

Formats provided by AL_EXT_MULAW_BFORMAT.

ExtMuLawFormat

Formats provided by AL_EXT_MULAW.

ExtMuLawMcFormat

Formats provided by AL_EXT_MULAW_MCFORMATS.

FlangerWaveform
Format

Audio formats supported by OpenAL.

FrequencyShifterDirection
LoopbackFormatChannels

Channel format for a loopback context. Requires ALC_SOFT_loopback

LoopbackFormatType

Sample format for a loopback context. Requires ALC_SOFT_loopback

RingModulatorWaveform
SoftHrtfStatus

The current HRTF mode of a device. Requires ALC_SOFT_HRTF

SoftMsadpcmFormat

Formats provided by AL_SOFT_MSADPCM.

SoftResampler

Resamplers provided by OpenAL-Soft.

SoftStereoCrossfeedLevel

OpenAL-Soft stereo crossfeed modes. Reduces the perceived separation between the left and right channels.

SoftStereoMode

OpenAL-Soft stereo mode. In headphones mode, stereo crossfeed or HRTF may be used automatically. HRTF can be explicitly enabled regardless of this setting.

SourceState

The current playback state of a source.

StandardFormat

Standard formats defined in the base specification.

VocalMorpherPhoneme
VocalMorpherWaveform

Statics

REVERB_PRESET_ALLEY
REVERB_PRESET_ARENA
REVERB_PRESET_AUDITORIUM
REVERB_PRESET_BATHROOM
REVERB_PRESET_CARPETEDHALLWAY
REVERB_PRESET_CASTLE_ALCOVE
REVERB_PRESET_CASTLE_COURTYARD
REVERB_PRESET_CASTLE_CUPBOARD
REVERB_PRESET_CASTLE_HALL
REVERB_PRESET_CASTLE_LARGEROOM
REVERB_PRESET_CASTLE_LONGPASSAGE
REVERB_PRESET_CASTLE_MEDIUMROOM
REVERB_PRESET_CASTLE_SHORTPASSAGE
REVERB_PRESET_CASTLE_SMALLROOM
REVERB_PRESET_CAVE
REVERB_PRESET_CHAPEL
REVERB_PRESET_CITY
REVERB_PRESET_CITY_ABANDONED
REVERB_PRESET_CITY_LIBRARY
REVERB_PRESET_CITY_MUSEUM
REVERB_PRESET_CITY_STREETS
REVERB_PRESET_CITY_SUBWAY
REVERB_PRESET_CITY_UNDERPASS
REVERB_PRESET_CONCERTHALL
REVERB_PRESET_DIZZY
REVERB_PRESET_DOME_SAINTPAULS
REVERB_PRESET_DOME_TOMB
REVERB_PRESET_DRIVING_COMMENTATOR
REVERB_PRESET_DRIVING_EMPTYGRANDSTAND
REVERB_PRESET_DRIVING_FULLGRANDSTAND
REVERB_PRESET_DRIVING_INCAR_LUXURY
REVERB_PRESET_DRIVING_INCAR_RACER
REVERB_PRESET_DRIVING_INCAR_SPORTS
REVERB_PRESET_DRIVING_PITGARAGE
REVERB_PRESET_DRIVING_TUNNEL
REVERB_PRESET_DRUGGED
REVERB_PRESET_DUSTYROOM
REVERB_PRESET_FACTORY_ALCOVE
REVERB_PRESET_FACTORY_COURTYARD
REVERB_PRESET_FACTORY_CUPBOARD
REVERB_PRESET_FACTORY_HALL
REVERB_PRESET_FACTORY_LARGEROOM
REVERB_PRESET_FACTORY_LONGPASSAGE
REVERB_PRESET_FACTORY_MEDIUMROOM
REVERB_PRESET_FACTORY_SHORTPASSAGE
REVERB_PRESET_FACTORY_SMALLROOM
REVERB_PRESET_FOREST
REVERB_PRESET_GENERIC
REVERB_PRESET_HALLWAY
REVERB_PRESET_HANGAR
REVERB_PRESET_ICEPALACE_ALCOVE
REVERB_PRESET_ICEPALACE_COURTYARD
REVERB_PRESET_ICEPALACE_CUPBOARD
REVERB_PRESET_ICEPALACE_HALL
REVERB_PRESET_ICEPALACE_LARGEROOM
REVERB_PRESET_ICEPALACE_LONGPASSAGE
REVERB_PRESET_ICEPALACE_MEDIUMROOM
REVERB_PRESET_ICEPALACE_SHORTPASSAGE
REVERB_PRESET_ICEPALACE_SMALLROOM
REVERB_PRESET_LIVINGROOM
REVERB_PRESET_MOOD_HEAVEN
REVERB_PRESET_MOOD_HELL
REVERB_PRESET_MOOD_MEMORY
REVERB_PRESET_MOUNTAINS
REVERB_PRESET_OUTDOORS_BACKYARD
REVERB_PRESET_OUTDOORS_CREEK
REVERB_PRESET_OUTDOORS_DEEPCANYON
REVERB_PRESET_OUTDOORS_ROLLINGPLAINS
REVERB_PRESET_OUTDOORS_VALLEY
REVERB_PRESET_PADDEDCELL
REVERB_PRESET_PARKINGLOT
REVERB_PRESET_PIPE_LARGE
REVERB_PRESET_PIPE_LONGTHIN
REVERB_PRESET_PIPE_RESONANT
REVERB_PRESET_PIPE_SMALL
REVERB_PRESET_PLAIN
REVERB_PRESET_PREFAB_CARAVAN
REVERB_PRESET_PREFAB_OUTHOUSE
REVERB_PRESET_PREFAB_PRACTISEROOM
REVERB_PRESET_PREFAB_SCHOOLROOM
REVERB_PRESET_PREFAB_WORKSHOP
REVERB_PRESET_PSYCHOTIC
REVERB_PRESET_QUARRY
REVERB_PRESET_ROOM
REVERB_PRESET_SEWERPIPE
REVERB_PRESET_SMALLWATERROOM
REVERB_PRESET_SPACESTATION_ALCOVE
REVERB_PRESET_SPACESTATION_CUPBOARD
REVERB_PRESET_SPACESTATION_HALL
REVERB_PRESET_SPACESTATION_LARGEROOM
REVERB_PRESET_SPACESTATION_LONGPASSAGE
REVERB_PRESET_SPACESTATION_MEDIUMROOM
REVERB_PRESET_SPACESTATION_SHORTPASSAGE
REVERB_PRESET_SPACESTATION_SMALLROOM
REVERB_PRESET_SPORT_EMPTYSTADIUM
REVERB_PRESET_SPORT_FULLSTADIUM
REVERB_PRESET_SPORT_GYMNASIUM
REVERB_PRESET_SPORT_LARGESWIMMINGPOOL
REVERB_PRESET_SPORT_SMALLSWIMMINGPOOL
REVERB_PRESET_SPORT_SQUASHCOURT
REVERB_PRESET_SPORT_STADIUMTANNOY
REVERB_PRESET_STONECORRIDOR
REVERB_PRESET_STONEROOM
REVERB_PRESET_UNDERWATER
REVERB_PRESET_WOODEN_ALCOVE
REVERB_PRESET_WOODEN_COURTYARD
REVERB_PRESET_WOODEN_CUPBOARD
REVERB_PRESET_WOODEN_HALL
REVERB_PRESET_WOODEN_LARGEROOM
REVERB_PRESET_WOODEN_LONGPASSAGE
REVERB_PRESET_WOODEN_MEDIUMROOM
REVERB_PRESET_WOODEN_SHORTPASSAGE
REVERB_PRESET_WOODEN_SMALLROOM

Traits

AsBufferData
AsBufferDataMut
DeviceTrait

Common capabilities expoed by both real and loopback devices.

EffectTrait

Implemented for effects defined by EFX.

FilterTrait

Implemented for filters as defined by EFX.

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