Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # install dependencies
- sudo apt-get install build-essential portaudio19-dev git
- # install rust (https://www.rust-lang.org/en-US/install.html)
- cd ~
- curl https://sh.rustup.rs -sSf | sh
- # clone plietars git repo
- git clone git@github.com:plietar/librespot.git
- # change system_information_string (approx row 44) from "librespot" to something more fun
- nano librespot/src/connection/mod.rs
- # compile librespot (TOOK ME SEVERAL HOURS! Maybe use Tmux to detach ssh?)
- cd librespot && cargo build --features alsa-backend
- # make USB sound card default
- sudo nano /etc/asound.conf
- # write this text into the file:
- pcm.!default {
- type plug
- slave.pcm "hw:1,0"
- }
- # restart alsa
- alsactl --force restore
- # play noise to test soundcard
- speaker-test -c 2 -r 48000
- # start librespot
- cd ~
- ./librespot/target/release/librespot -n RaspberryPi
- defaults.ctl.card 0
- defaults.pcm.card 0
- defaults.ctl.card 1
- defaults.pcm.card 1
- [Unit]
- Description=Librespot is an open source client library for Spotify.
- [Service]
- Type=simple
- Restart=on-failure
- RestartSec=10
- TimeoutStartSec=15
- User=pi
- WorkingDirectory=/home/pi/
- ExecStart=/home/pi/librespot --name RaspberryPi
- [Install]
- WantedBy=multi-user.target
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement