mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-03 00:29:35 +02:00
Merge pull request #359 from pizzaboy75/master
Add volume parameter to Librespot integration
This commit is contained in:
commit
077e9dd9fb
3 changed files with 5 additions and 2 deletions
|
@ -37,6 +37,7 @@ SpotifyStream::SpotifyStream(PcmListener* pcmListener, const StreamUri& uri) : P
|
|||
string username = uri_.getQuery("username", "");
|
||||
string password = uri_.getQuery("password", "");
|
||||
string cache = uri_.getQuery("cache", "");
|
||||
string volume = uri_.getQuery("volume", "");
|
||||
string bitrate = uri_.getQuery("bitrate", "320");
|
||||
string devicename = uri_.getQuery("devicename", "Snapcast");
|
||||
string onstart = uri_.getQuery("onstart", "");
|
||||
|
@ -51,6 +52,8 @@ SpotifyStream::SpotifyStream(PcmListener* pcmListener, const StreamUri& uri) : P
|
|||
params_ += " --bitrate " + bitrate + " --backend pipe";
|
||||
if (!cache.empty())
|
||||
params_ += " --cache \"" + cache + "\"";
|
||||
if (!volume.empty())
|
||||
params_ += " --initial-volume \"" + volume + "\"";
|
||||
if (!onstart.empty())
|
||||
params_ += " --onstart \"" + onstart + "\"";
|
||||
if (!onstop.empty())
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
* Implements EncoderListener to get the encoded data.
|
||||
* Data is passed to the PcmListener
|
||||
* usage:
|
||||
* snapserver -s "spotify:///librespot?name=Spotify&username=<my username>&password=<my password>[&devicename=Snapcast][&bitrate=320][&cache=<cache dir>]"
|
||||
* snapserver -s "spotify:///librespot?name=Spotify&username=<my username>&password=<my password>[&devicename=Snapcast][&bitrate=320][&volume=<volume in percent>][&cache=<cache dir>]"
|
||||
*/
|
||||
class SpotifyStream : public ProcessStream, WatchdogListener
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue