mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-18 11:36:14 +02:00
Add "mute" to stream API
This commit is contained in:
parent
60dc1aa48a
commit
9e3c0fdf55
12 changed files with 47 additions and 10 deletions
|
@ -347,6 +347,15 @@ void PcmStream::setVolume(uint16_t volume, ResultHandler handler)
|
|||
}
|
||||
|
||||
|
||||
void PcmStream::setMute(bool mute, ResultHandler handler)
|
||||
{
|
||||
LOG(DEBUG, LOG_TAG) << "setMute: " << mute << "\n";
|
||||
if (!properties_.can_control)
|
||||
return handler({ControlErrc::can_control_is_false});
|
||||
sendRequest("Plugin.Stream.Player.SetProperty", {"mute", mute}, std::move(handler));
|
||||
}
|
||||
|
||||
|
||||
void PcmStream::setRate(float rate, ResultHandler handler)
|
||||
{
|
||||
LOG(DEBUG, LOG_TAG) << "setRate: " << rate << "\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue