Skip to content

Commit b3503c4

Browse files
committed
Allow for alternate backends, such as pipe. Fixes dtcooper#83
1 parent ff9eb91 commit b3503c4

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ which passes arguments to [librespot](https://github.com/librespot-org/librespot
123123
# By default, the volume normalization is enabled, add alternative volume
124124
# arguments here if you'd like, but these should be fine.
125125
#VOLUME_ARGS="--enable-volume-normalisation --linear-volume --initial-volume=100"
126+
127+
# Backend could be set to pipe here, but it's for very advanced use cases of
128+
# librespot, so you shouldn't need to change this under normal circumstances.
129+
#BACKEND_ARGS="--backend alsa"
126130
```
127131

128132
After editing restart the daemon by running: `sudo systemctl restart raspotify`

raspotify/etc/default/raspotify

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@
2828
# By default, the volume normalization is enabled, add alternative volume
2929
# arguments here if you'd like, but these should be fine.
3030
#VOLUME_ARGS="--enable-volume-normalisation --linear-volume --initial-volume=100"
31+
32+
# Backend could be set to pipe here, but it's for very advanced use cases of
33+
# librespot, so you shouldn't need to change this under normal circumstances.
34+
#BACKEND_ARGS="--backend alsa"

raspotify/lib/systemd/system/raspotify.service

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ Environment="DEVICE_NAME=raspotify (%H)"
1313
Environment="BITRATE=160"
1414
Environment="CACHE_ARGS=--disable-audio-cache"
1515
Environment="VOLUME_ARGS=--enable-volume-normalisation --linear-volume --initial-volume=100"
16+
Environment="BACKEND_ARGS=--backend alsa"
1617
EnvironmentFile=-/etc/default/raspotify
17-
ExecStart=/usr/bin/librespot --name ${DEVICE_NAME} --backend alsa --bitrate ${BITRATE} $CACHE_ARGS $VOLUME_ARGS $OPTIONS
18+
ExecStart=/usr/bin/librespot --name ${DEVICE_NAME} $BACKEND_ARGS --bitrate ${BITRATE} $CACHE_ARGS $VOLUME_ARGS $OPTIONS
1819

1920
[Install]
2021
WantedBy=multi-user.target

0 commit comments

Comments
 (0)