diff options
author | Max Kellermann <max@duempel.org> | 2014-01-27 08:20:25 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-28 09:20:53 +0100 |
commit | f5a923b9d16e4c63942a033d1bdb2ab150aae342 (patch) | |
tree | 6e3c39b305fd2a1da2a7b9c2b79a6737ca21a23b /src/command/OtherCommands.cxx | |
parent | 36bab6ef066c6898a791dd15054301f80757b3f6 (diff) | |
download | mpd-f5a923b9d16e4c63942a033d1bdb2ab150aae342.tar.gz mpd-f5a923b9d16e4c63942a033d1bdb2ab150aae342.tar.xz mpd-f5a923b9d16e4c63942a033d1bdb2ab150aae342.zip |
OutputAll: convert to class, move instance to class Partition
Another big chunk of code for multi-player support.
Diffstat (limited to 'src/command/OtherCommands.cxx')
-rw-r--r-- | src/command/OtherCommands.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
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 <assert.h> @@ -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; |