Bug 132228 - If unmuting by increasing volume, muting again will change volume to original
Summary: If unmuting by increasing volume, muting again will change volume to original
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-10 21:45 UTC by Pasi Saarinen
Modified: 2006-08-11 01:15 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pasi Saarinen 2006-08-10 21:45:45 UTC
Version:           1.4.1 (using KDE KDE 3.5.4)
Installed from:    Unlisted Binary Package
OS:                Linux

I have bound a button to mute with on my keyboard.
I press it once and it mutes, then if i increase the volume and press the mute button again it changes to the volume it had before muting the first time and not to zero.
Comment 1 Martin Aumueller 2006-08-11 01:15:30 UTC
SVN commit 571869 by aumuell:

probably unmute volume correctly when increasing it while muted
BUG: 132228


 M  +2 -0      ChangeLog  
 M  +4 -1      src/enginecontroller.cpp  


--- trunk/extragear/multimedia/amarok/ChangeLog #571868:571869
@@ -79,6 +79,8 @@
       since the last time it was enabled.
 
   BUGFIXES:
+    * Increasing or decreasing volume while muted would not correctly unmute.
+      (BR 132228)
     * Better resize behavior in iPod collection view mode. Patch by Joe Rabinoff
       <bobqwatson@yahoo.com> (BR 132016)
     * Make sure a track's compilation status is returned properly when running
--- trunk/extragear/multimedia/amarok/src/enginecontroller.cpp #571868:571869
@@ -571,6 +571,8 @@
 
 int EngineController::setVolume( int percent ) //SLOT
 {
+    m_muteVolume = 0;
+
     if( percent < 0 ) percent = 0;
     if( percent > 100 ) percent = 100;
 
@@ -596,8 +598,9 @@
 {
     if( m_muteVolume == 0 )
     {
-        m_muteVolume = m_engine->volume();
+        int saveVolume = m_engine->volume();
         setVolume( 0 );
+        m_muteVolume = saveVolume;
     }
     else
     {