tesselode / kira

Library for expressive game audio.
https://crates.io/crates/kira
Apache License 2.0
855 stars 43 forks source link

ALSA function 'snd_pcm_hw_params' failed with error 'EIO: I/O error' #77

Closed tranxuanthang closed 7 months ago

tranxuanthang commented 7 months ago

I am facing this error on Arch Linux (KDE Plasma 5 on Wayland). I did not know what when wrong, and I cannot reproduce when using symphonia-play (the song still played as expected). Please let me know if you need any additional information.

Step to reproduce:

git clone git@github.com:tesselode/kira-examples.git
cd kira-examples
cargo run -p simple-sound-playback

Full error message:

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: BuildStreamError(BackendSpecific { err: BackendSpecificError { description: "ALSA function 'snd_pcm_hw_params' failed with error 'EIO: I/O error'" } })', /home/thang/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kira-0.8.0/src/manager/backend/cpal/desktop/stream_manager.rs:69:59
stack backtrace:
   0: rust_begin_unwind
             at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panicking.rs:593:5
   1: core::panicking::panic_fmt
             at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/panicking.rs:67:14
   2: core::result::unwrap_failed
             at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/result.rs:1651:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/result.rs:1076:23
   4: kira::manager::backend::cpal::desktop::stream_manager::StreamManager::start::{{closure}}
             at /home/thang/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kira-0.8.0/src/manager/backend/cpal/desktop/stream_manager.rs:69:4
tranxuanthang commented 7 months ago

Looks like running pacman -Syu AND restarting the PC fixed it for me!