actions: new action: set_volume

This commit is contained in:
Andrzej Rybczak
2013-04-06 14:07:35 +02:00
parent a4160790cf
commit ead12406e3
4 changed files with 32 additions and 5 deletions

View File

@@ -799,14 +799,16 @@ void Connection::SetConsume(bool mode)
}
}
void Connection::SetVolume(unsigned vol)
bool Connection::SetVolume(unsigned vol)
{
if (!itsConnection || vol > 100)
return;
return false;
assert(!isCommandsListEnabled);
GoBusy();
if (mpd_run_set_volume(itsConnection, vol) && !supportsIdle)
bool success = mpd_run_set_volume(itsConnection, vol);
if (success && !supportsIdle)
UpdateStatus();
return success;
}
std::string Connection::GetReplayGainMode()