Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.
/ alto Public archive

Idiomatic Rust bindings for OpenAL 1.1 and extensions (including EFX).

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

jpernst/alto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Idiomatic Rust bindings for OpenAL 1.1 and extensions (including EFX).

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages