mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-30 17:36:16 +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
|
@ -564,6 +564,12 @@ void Server::processRequest(const jsonrpcpp::request_ptr request, const OnRespon
|
|||
throw jsonrpcpp::InvalidParamsException("Value for volume must be an int", request->id());
|
||||
stream->setVolume(value.get<int16_t>(), [handle_response](const snapcast::ErrorCode& ec) { handle_response(ec); });
|
||||
}
|
||||
else if (name == "mute")
|
||||
{
|
||||
if (!value.is_boolean())
|
||||
throw jsonrpcpp::InvalidParamsException("Value for mute must be bool", request->id());
|
||||
stream->setMute(value.get<bool>(), [handle_response](const snapcast::ErrorCode& ec) { handle_response(ec); });
|
||||
}
|
||||
else if (name == "rate")
|
||||
{
|
||||
if (!value.is_number_float())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue