mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 08:34:34 +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:
@@ -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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user