Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. # install dependencies
  2. sudo apt-get install build-essential portaudio19-dev git
  3. # install rust (https://www.rust-lang.org/en-US/install.html)
  4. cd ~
  5. curl https://sh.rustup.rs -sSf | sh
  6. # clone plietars git repo
  7. git clone git@github.com:plietar/librespot.git
  8. # change system_information_string (approx row 44) from "librespot" to something more fun
  9. nano librespot/src/connection/mod.rs
  10. # compile librespot (TOOK ME SEVERAL HOURS! Maybe use Tmux to detach ssh?)
  11. cd librespot && cargo build --features alsa-backend
  12. # make USB sound card default
  13. sudo nano /etc/asound.conf
  14. # write this text into the file:
  15. pcm.!default {
  16. type plug
  17. slave.pcm "hw:1,0"
  18. }
  19. # restart alsa
  20. alsactl --force restore
  21. # play noise to test soundcard
  22. speaker-test -c 2 -r 48000
  23. # start librespot
  24. cd ~
  25. ./librespot/target/release/librespot -n RaspberryPi
  26.  
  27. defaults.ctl.card 0
  28. defaults.pcm.card 0
  29.  
  30. defaults.ctl.card 1
  31. defaults.pcm.card 1
  32.  
  33. [Unit]
  34. Description=Librespot is an open source client library for Spotify.
  35.  
  36. [Service]
  37. Type=simple
  38. Restart=on-failure
  39. RestartSec=10
  40. TimeoutStartSec=15
  41. User=pi
  42. WorkingDirectory=/home/pi/
  43. ExecStart=/home/pi/librespot --name RaspberryPi
  44.  
  45. [Install]
  46. WantedBy=multi-user.target
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement