1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-11 16:44:05 +02: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 double
MprisPlugin::volume() const MprisPlugin::volume() const
{ {
return AudioEngine::instance()->volume(); return static_cast<double>(AudioEngine::instance()->volume()) / 100.0;
} }
void void
MprisPlugin::setVolume( double value ) MprisPlugin::setVolume( double value )
{ {
AudioEngine::instance()->setVolume( value ); AudioEngine::instance()->setVolume( value * 100 );
} }