Bug 134274 - unpausing makes volume level higher
Summary: unpausing makes volume level higher
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-18 15:07 UTC by Andrew Gaydenko
Modified: 2006-09-21 00:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Okay... Got problems with getting SVN to compile, so couldn't test this myself... It might fix it. Or then it doesn't. I don't know. Feel free to test, and please let me know if I guessed right. (498 bytes, patch)
2006-09-20 20:34 UTC, Tuomas Nurmi
Details
Try #2... One shouldn't ever trust that his code compiles without trying. Now I do it again, hopefully with better luck. (899 bytes, patch)
2006-09-20 22:43 UTC, Tuomas Nurmi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Gaydenko 2006-09-18 15:07:48 UTC
Version:           current SVN (using KDE KDE 3.5.4)
Installed from:    Gentoo Packages
Compiler:          gcc 4.1.1 
OS:                Linux

For current SVNversion - unpausing makes volume level much higher. Probably, the bug was introduced approximately when Fader classes were added to xine-engine.cpp.
Comment 1 Andrew Gaydenko 2006-09-19 17:41:24 UTC
After removing fading at pause (see #127316), the bug still exists at stop/play scenario.
Comment 2 Tuomas Nurmi 2006-09-20 20:34:16 UTC
Created attachment 17854 [details]
Okay... Got problems with getting SVN to compile, so couldn't test this myself... It might fix it. Or then it doesn't. I don't know. Feel free to test, and please let me know if I guessed right.
Comment 3 Andrew Gaydenko 2006-09-20 21:08:34 UTC
Tuomas,

I have got the error:

xine-engine.cpp:521: error: 'vol' was not declared in this scope
Comment 4 Tuomas Nurmi 2006-09-20 22:43:29 UTC
Created attachment 17856 [details]
Try #2... One shouldn't ever trust that his code compiles without trying. Now I do it again, hopefully with better luck.
Comment 5 Andrew Gaydenko 2006-09-20 23:05:56 UTC
Tuomas,

It seems like last patch is more lucky :-) A volume level doesn't jump now. Thanks!
Comment 6 Mark Kretschmann 2006-09-21 00:17:34 UTC
SVN commit 586904 by markey:

Fix regression: Fadeout would increase the original volume level.

Thanks Andrew and Tuomas for figuring this out :)

BUG: 134274


 M  +2 -1      xine-engine.cpp  


--- trunk/extragear/multimedia/amarok/src/engine/xine/xine-engine.cpp #586903:586904
@@ -489,6 +489,7 @@
 
     m_fadeOutRunning = !m_fadeOutRunning;
     const bool isPlaying = m_stream && ( xine_get_status( m_stream ) == XINE_STATUS_PLAY );
+    const float originalVol = Engine::Base::makeVolumeLogarithmic( m_volume ) * m_preamp;
 
     // NOTE The fadeout gets stuck when the EQ is active, so we skip it then
     if( m_xfadeLength > 0 && !m_equalizerEnabled && isPlaying )
@@ -518,7 +519,7 @@
         }
     }
     if( m_fadeOutRunning )
-        xine_set_param( m_stream, XINE_PARAM_AUDIO_AMP_LEVEL, (uint)(m_volume * m_preamp) );
+        xine_set_param( m_stream, XINE_PARAM_AUDIO_AMP_LEVEL, (uint) originalVol );
     m_fadeOutRunning = !m_fadeOutRunning;
 }