mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-27 21:38:48 +02:00
Add volume parameter to Librespot integration
Make use of the new "--initial-volume" parameter in librespot
This commit is contained in:
parent
fcf5997e34
commit
b1165ff2cd
1 changed files with 3 additions and 0 deletions
|
@ -36,6 +36,7 @@ SpotifyStream::SpotifyStream(PcmListener* pcmListener, const StreamUri& uri) : P
|
||||||
string username = uri_.getQuery("username", "");
|
string username = uri_.getQuery("username", "");
|
||||||
string password = uri_.getQuery("password", "");
|
string password = uri_.getQuery("password", "");
|
||||||
string cache = uri_.getQuery("cache", "");
|
string cache = uri_.getQuery("cache", "");
|
||||||
|
string volume = uri_.getQuery("volume", "");
|
||||||
string bitrate = uri_.getQuery("bitrate", "320");
|
string bitrate = uri_.getQuery("bitrate", "320");
|
||||||
string devicename = uri_.getQuery("devicename", "Snapcast");
|
string devicename = uri_.getQuery("devicename", "Snapcast");
|
||||||
string onstart = uri_.getQuery("onstart", "");
|
string onstart = uri_.getQuery("onstart", "");
|
||||||
|
@ -50,6 +51,8 @@ SpotifyStream::SpotifyStream(PcmListener* pcmListener, const StreamUri& uri) : P
|
||||||
params_ += " --bitrate " + bitrate + " --backend pipe";
|
params_ += " --bitrate " + bitrate + " --backend pipe";
|
||||||
if (!cache.empty())
|
if (!cache.empty())
|
||||||
params_ += " --cache \"" + cache + "\"";
|
params_ += " --cache \"" + cache + "\"";
|
||||||
|
if (!volume.empty())
|
||||||
|
params_ += " --initial-volume \"" + volume + "\"";
|
||||||
if (!onstart.empty())
|
if (!onstart.empty())
|
||||||
params_ += " --onstart \"" + onstart + "\"";
|
params_ += " --onstart \"" + onstart + "\"";
|
||||||
if (!onstop.empty())
|
if (!onstop.empty())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue