Crate alto

Source
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§

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.

Type Aliases§