Skip to content

Kira does not work if ALSA is not working - it does not attempt for other devices #137

@deavid

Description

@deavid

Not sure if I should send this to this crate or bevy_kira_audio, but it does reproduce with this repository code alone too.

In my system, trying to start up any example of this git repo, I get:

ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
Error: DefaultStreamConfigError(DeviceNotAvailable)

Whereas, with a bevy app, which uses bevy_audio, using rodio, I get:

ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp

And it works.

Rodio seems to have some sort of detection or trying different devices until one works:

https://github.com/RustAudio/rodio/blob/v0.19.0/src/stream.rs#L56

Kira, either doesn't have this, or it's not clear enough and bevy_kira_audio doesn't do it correctly - but even then, your own examples do not work on my system.

And this is not a problem of my system, because kira is the only one that fails to reproduce audio. This is a Kubuntu fresh install (mostly) with Pipewirte and a Focusrite audio interface.

A small example of what does reproduce audio correctly in my system:

  • Default Bevy games using bevy_audio
  • Google Chrome, Firefox
  • Steam games, native+proton emulated
  • Audacity (which reports to be using ALSA)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions