mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-25 23:06:23 +02:00
* Unmute only when previously muted.
This commit is contained in:
@@ -537,12 +537,12 @@ AudioEngine::setVolume( int percentage )
|
|||||||
{
|
{
|
||||||
Q_D( AudioEngine );
|
Q_D( AudioEngine );
|
||||||
|
|
||||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << percentage;
|
tDebug() << Q_FUNC_INFO << percentage;
|
||||||
|
|
||||||
percentage = qBound( 0, percentage, 100 );
|
percentage = qBound( 0, percentage, 100 );
|
||||||
d->audioOutput->setVolume( (qreal)percentage / 100.0 );
|
d->audioOutput->setVolume( (qreal)percentage / 100.0 );
|
||||||
|
|
||||||
if ( percentage > 0 )
|
if ( percentage > 0 && d->audioOutput->isMuted() )
|
||||||
d->audioOutput->setMuted( false );
|
d->audioOutput->setMuted( false );
|
||||||
emit volumeChanged( percentage );
|
emit volumeChanged( percentage );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user