summaryrefslogtreecommitdiff
path: root/status.c
blob: 5dc6f59530af89b821b8f892b8e7381c388cc707 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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);
}