Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alsa: set configdir and plugindir? #8073

Open
barucden opened this issue Feb 7, 2024 · 1 comment
Open

alsa: set configdir and plugindir? #8073

barucden opened this issue Feb 7, 2024 · 1 comment

Comments

@barucden
Copy link

barucden commented Feb 7, 2024

When using FFplay_jll to play audio files on linux as follows

using FFplay_jll
mp3_path = "sample.mp3"
ffplay() do exe
    run(`$exe $path`)
end

ffplay does not play any sound and prints these messages:

ALSA lib conf.c:4499:(snd_config_update_r) Cannot access file /workspace/destdir/share/alsa/alsa.conf
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default

That can be resolved by setting the ALSA_CONFIG_PATH variable:

run(addenv(`$exe $path`, "ALSA_CONFIG_PATH" => "/usr/share/alsa/alsa.conf"))

However, that is not enough; ffplay still does not play any sound and prints:

ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_pulse.so (/workspace/destdir/lib/alsa-lib/libasound_module_pcm_pulse.so: cannot open shared object file: No such file or directory)

That requires to set ALSA_PLUGIN_DIR:

run(addenv(`$exe $path`, "ALSA_CONFIG_PATH" => "/usr/share/alsa/alsa.conf",
                         "ALSA_PLUGIN_DIR" => "/usr/lib/alsa-lib/"))

Based on the /workspace/destdir/ prefix, I assume there's an issue with how we build alsa_jll. I noticed that the configure.ac script from alsa-lib provides --with-configdir and --with-plugindir. Would it help to set them to /usr/share/alsa/ and /usr/lib/alsa-lib/, respectively?

I found a similar issue (homebridge/ffmpeg-for-homebridge#9) with a corresponding fix (homebridge/ffmpeg-for-homebridge#10).

Discovered on Discourse.

@dalum
Copy link

dalum commented Jul 19, 2024

I've just run into this when trying to @ccall into libasound. Would be lovely to have a fix for it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants