Closed Dantoes closed 7 years ago
That looks like librespot is using the stdout backend, which is odd. Do you hear any audio during those few seconds ?
Can you run librespot --name 'MusicBox' --backend '?'
?
There's wasn't any audio output before the tracks stopped. Here's your requested output:
pi@musicbox:~ $ RUST_BACKTRACE=1 /home/pi/librespot/librespot --name 'MusicBox' --backend '?'
INFO:librespot: librespot 910974e (2017-07-17). Built on 2017-07-23. Build ID: vL9wym2D
Available Backends :
- pipe (default)
pi@musicbox:~ $
Looks like stdout is the only output available which would explain the behaviour. I ran speaker-test
and aplay
which both worked fine. So the audio device is available and works.
Is this an issue of detecting the audio device or has it something to do with the compilation?
Your librespot binary was built without any backends enabled. What command did you use to build it ?
I'd say this is a dupe of issue #175
I built it on my PC (Mint 18.2) using these commands:
409 docker build -t librespot-cross -f contrib/Dockerfile .
410 docker run -v /tmp/librespot-build:/build librespot-cross cargo build --release --target arm-unknown-linux-gnueabihf --no-default-features --features alsa
My PC also has a working sound card if it plays any role in the compile process.
Comparing the commands with the ones in the Readme, I noticed it I have used --features alsa
instead of --features alsa-backend
. I copied & pasted the commands and probably missed the last bit. I guess that is the cause of my issue. I'll try to recompile librespot with the correct parameters and answer back if it fixed the issue.
As I said: this is a dupe of issue #175 . Something in the overall system is confusing "all data sent" with "all data played". As soon as all data has been received the player class receives a kMessageTypeNext, telling it to start playback of the next track. As the pipe backend would download the file at full speed, this only takes seconds. With other backends the end can be truncated. See issue #175 .
After recompiling with the correct parameter everything works flawlessly again. The audio is back, the console output is gone (obviously) and the tracks do not skip anymore. I don't know if it has something to do with #175 as @michaelherger stated. I leave that to you guys to decide.
Anyway, thanks @plietar for pointing me in the right direction.
I have an issue with librespot on my RPI2 where every tracks only plays for about 10-40 seconds. Then the playback abruptly stops and the next track is played (again only a few seconds).
Console ouput:
Please note the
error sending packet Error
, which does not appear when running librespot on my PC.On stderr lots of binary data is written which is why I redirected the output. After less than one minute the file got 107 MB big. Here's what it looks like (shortened, output varies for each tests):
I can only assume, but it looks like the decoded audio data is written to stderr.
OS: Raspbian on RPI2 Version: 910974e Cross-compiled using the provided docker image.