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