-
Notifications
You must be signed in to change notification settings - Fork 5
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
WHat backend to use on a Raspberry Pi (Zero 2) #36
Comments
I tried using the "alsa" feature, with the failure below. Maybe that drags me into new "sysroot" territory? Thanks for any help....
|
Hi Unfortunately I don't have a similar system to try things out. And I'm not sure where the issue arises. The only thing that sticks out to me is the arch your targeting (arm-unknown-linux-musleabi) which is an armv6 or armv7 (32 bits) whereas the raspberry pi zero 2 w seems to be an arm64 system: So you might try using The default backend is the miniaudio backend, which Soloud builds automatically, and which I would think is most preferable especially for cross-compilation. Note that if you would like to try another backend with cross, you would have to tell cross how to install the dependencies in their provided container, for example (arm64-gnu):
Unfortunately although debian provides musl-linux-arm* arches, it doesn't provide many packages for them. Another option is to try building with docker and alpine (which uses musl by default), even if you would like to try other backend you would probably find alsa-lib-dev built for arm64. A third option is if your raspberry pi runs raspbian or a gnu based distro, is to just not build with musl, and just target the gnu toolchain: |
Thanks for the fast response. I tried I also tried the gnu toolchain before, with the same or similar issues (I'd have to go back and reproduce them for details). I can try building on the pi itself, but I doubt there will be any difference. |
Looking at the way the miniaudio driver is initialized, it searches for several libs in the system lib path, starting with libasound2 (alsa) then it dynamically loads it. |
This is what I have:
So, I will see where I can get libsound2 ... |
What exact file is it trying to load? Would it find and load That comes as part of the libasound2 package and is installed. On my Pi the file
The last line being
I tried Maybe related to use of MUSL, so I'll try a switch to GNU libc and see if that changes how the dynamic linking works and if this lib is then found. |
Problem linking that (so far)...
|
In the miniaudio header, it searches for both libasound.so.2 and libasound.so, so it should be able to load /usr/lib/aarch64-linux-gnu/libasound.so.2. Regarding the "version 'GLIBC_2.25'" error, this is a Rust toolchain error. Can you try a |
Brilliant! I got it working with gnu! |
Describe the bug
Soloud::default()
returns an error when run on raspberry pi zero 2 w.To Reproduce
Compile code using the example code (I used a .wav file - I hope that is not important) for raspberry pi using:
cross build --target=arm-unknown-linux-musleabi
(this works for other code prior to adding soloud)
When run, the call to:
let sl = Soloud::default().expect("Could not get Soloud");
returns:
Could not get Soloud: Internal(UnknownError)
I wonder if there is a specific audio backend I need to chose for raspberry pi?
Expected behavior
default() returns a valid instance and I can play audio
Desktop (please complete the following information):
cargo build -vv
: cross compiled from mac so not relevant, as build works fine.Additional context
The text was updated successfully, but these errors were encountered: