jpernst / alto

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alto::open_loopback(None) returns Invalid Device Error

sebastianpfluegelmeier opened this issue · comments

i get thread 'main' panicked at 'called Result::unwrap()on anErr value: InvalidDevice', libcore/result.rs:945:5 in the third line.

fn main () {
    let alto =  Alto::load_default().unwrap();
    let mut loopback: LoopbackDevice<Stereo<i16>> = alto.open_loopback(None).unwrap()
}

when i call alcLoopbackOpenDeviceSOFT(NULL); in openal-soft directly, it works.
Is the rust code equivalent to the c code or did i miss something?

Alto passes the default output device specifier when none is provided. Apparently this extension doesn't seem to like that for some reason. I've pushed an update to git that will just pass null when you give None as a spec. If you could try the latest git version and confirm that it works, I'll publish it.

Allright, the github version works, i think you can publish it on crates.io.

Done