From f5a923b9d16e4c63942a033d1bdb2ab150aae342 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 27 Jan 2014 08:20:25 +0100 Subject: OutputAll: convert to class, move instance to class Partition Another big chunk of code for multi-player support. --- src/command/OtherCommands.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/command/OtherCommands.cxx') diff --git a/src/command/OtherCommands.cxx b/src/command/OtherCommands.cxx index 328683d3d..359fa9fe3 100644 --- a/src/command/OtherCommands.cxx +++ b/src/command/OtherCommands.cxx @@ -45,6 +45,7 @@ #include "db/PlaylistVector.hxx" #include "client/ClientFile.hxx" #include "client/Client.hxx" +#include "Partition.hxx" #include "Idle.hxx" #include @@ -254,7 +255,7 @@ handle_setvol(Client &client, gcc_unused int argc, char *argv[]) return CommandResult::ERROR; } - success = volume_level_change(level); + success = volume_level_change(client.partition.outputs, level); if (!success) { command_error(client, ACK_ERROR_SYSTEM, "problems setting volume"); @@ -276,7 +277,7 @@ handle_volume(Client &client, gcc_unused int argc, char *argv[]) return CommandResult::ERROR; } - const int old_volume = volume_level_get(); + const int old_volume = volume_level_get(client.partition.outputs); if (old_volume < 0) { command_error(client, ACK_ERROR_SYSTEM, "No mixer"); return CommandResult::ERROR; @@ -288,7 +289,8 @@ handle_volume(Client &client, gcc_unused int argc, char *argv[]) else if (new_volume > 100) new_volume = 100; - if (new_volume != old_volume && !volume_level_change(new_volume)) { + if (new_volume != old_volume && + !volume_level_change(client.partition.outputs, new_volume)) { command_error(client, ACK_ERROR_SYSTEM, "problems setting volume"); return CommandResult::ERROR; -- cgit v1.2.3