13 releases

Uses old Rust 2015

0.6.1 May 21, 2019
0.6.0 Aug 18, 2018
0.5.3 May 5, 2018
0.5.1 May 23, 2017
0.1.0 Nov 3, 2016

#7 in #openal

Download history 65/week @ 2023-11-27 36/week @ 2023-12-04 66/week @ 2023-12-11 74/week @ 2023-12-18 40/week @ 2023-12-25 34/week @ 2024-01-01 85/week @ 2024-01-08 81/week @ 2024-01-15 54/week @ 2024-01-22 56/week @ 2024-01-29 61/week @ 2024-02-05 77/week @ 2024-02-12 129/week @ 2024-02-19 107/week @ 2024-02-26 102/week @ 2024-03-04 73/week @ 2024-03-11

422 downloads per month
Used in 6 crates (via alto)

MIT/Apache

60KB
1K SLoC

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)`;

Dependencies

~0–620KB