1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-23 17:29:42 +01:00

MPRIS2: Fix volume property

Volume is a double between 0 and 1, not a percentage between 0 and 100.
This commit is contained in:
Alex Merry 2012-05-17 14:16:36 +01:00
parent 8b17657da1
commit 1f0f4e21a8

View File

@ -332,14 +332,14 @@ MprisPlugin::setShuffle( bool value )
double
MprisPlugin::volume() const
{
return AudioEngine::instance()->volume();
return static_cast<double>(AudioEngine::instance()->volume()) / 100.0;
}
void
MprisPlugin::setVolume( double value )
{
AudioEngine::instance()->setVolume( value );
AudioEngine::instance()->setVolume( value * 100 );
}