Skip to content
Idiomatic Rust bindings for OpenAL 1.1 and extensions (including EFX).
Branch: master
Clone or download
jpernst Merge pull request #40 from mtak-/dynamic-feature-flag
add a dynamic feature flag, allowing static linking if desired
Latest commit df2f303 May 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
al-sys handle link KIND correctly May 21, 2019
examples Add capture example Aug 3, 2018
src Don't use default_output for loopback devices Aug 3, 2018
tests Add tests for Alto struct Jun 11, 2017
.gitignore Rename to alto Nov 3, 2016
.travis.yml Add .travis.yml config file Jun 11, 2017
Cargo.toml add a dynamic feature flag, allowing static linking if desired May 20, 2019
LICENSE-APACHE
LICENSE-MIT Add support for alsoft specific configuration hints Feb 11, 2017
README.md Fix typo Dec 21, 2017

README.md

alto

alto provides idiomatic Rust bindings for OpenAL 1.1 and extensions (including EFX).

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.

API Usage

let alto = Alto::load_default()?;

for s in alto.enumerate_outputs() {
    println!("Found device: {}", s.to_str()?);
}

let device = alto.open(None)?; // Opens the default audio device
let context = device.new_context(None)?; // Creates a default context

// Configure listener
context.set_position([1.0, 4.0, 5.0]);
context.set_velocity([2.5, 0.0, 0.0]);
context.set_orientation(([0.0, 0.0, 1.0], [0.0, 1.0, 0.0]));

let source = context.new_static_source()?;

// Now you can load your samples and store them in a buffer with
// `context.new_buffer(samples, frequency)`;
You can’t perform that action at this time.