diff options
author | Maniac <na@na.na> | 2015-07-03 22:29:41 +0200 |
---|---|---|
committer | Maniac <na@na.na> | 2015-07-03 22:29:41 +0200 |
commit | da407909879f82c15f786bda3fedda0cae892100 (patch) | |
tree | 143c2b842028c38e8f7facfe576567039459afd9 /status.c | |
download | vdr-plugin-mpv-da407909879f82c15f786bda3fedda0cae892100.tar.gz vdr-plugin-mpv-da407909879f82c15f786bda3fedda0cae892100.tar.bz2 |
import 0.0.40.0.4
Diffstat (limited to 'status.c')
-rw-r--r-- | status.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/status.c b/status.c new file mode 100644 index 0000000..5dc6f59 --- /dev/null +++ b/status.c @@ -0,0 +1,25 @@ +////////////////////////////////////////////////////////////////////////////// +/// /// +/// This file is part of the VDR mpv plugin and licensed under AGPLv3 /// +/// /// +/// See the README file for copyright information /// +/// /// +////////////////////////////////////////////////////////////////////////////// + +#include "status.h" + +cMpvStatus::cMpvStatus(cMpvPlayer *player) +{ + Volume = cDevice::CurrentVolume(); + Player = player; +} + +void cMpvStatus::SetVolume(int volume, bool absolute) +{ + if (absolute) + Volume = volume; + else + Volume += volume; + + Player->SetVolume(Volume/2.55); +} |