Summary: | enabling equalizer lowers the volume alot (xine engine) | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Thomas Walther <thomas> |
Component: | Playback | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | r, torquil |
Priority: | NOR | ||
Version: | 1.4-beta3 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | The patch should decrease the volume cutoff significantly. |
Description
Thomas Walther
2006-05-14 15:40:34 UTC
On Mandriva Cooker running KDE 3.5.3 and Amarok 1.4.1 this issue is still present... Turning _off_ the Equalizer increases player volume and conversely turning _on_ the equalizer decreases player volume. This is probably related -- switching the Equalizer to preset='Zero' and then toggling the 'Enable Equalizer' on and off seems to have far less impact on player volume. *** Bug 133781 has been marked as a duplicate of this bug. *** I am the person who made the xine equalizer patch which introduced the volume decrease. Before this patch the equalizer was absolutely broken. So i adopted the code from kaffeine. To resolve this issue we need either a person who knows well about xine lib or an other (third) open source audio player. This audio player must use xine lib and must have a working equalizer. Then we can have a look at its code. *** Bug 126788 has been marked as a duplicate of this bug. *** Just asking; What about importing equalizer from another application such as videolan ,or xmms ? I write this because I suppose videolan uses xine codecs (don't know about xmms). Again , just asking, don't know if it can happen .By the way same bug with helix engine on suse 10.0 The following patch should decrease the volume cutoff significantly. Some of you will notice that it is still there. Regards, Tobias Index: amarok/src/engine/xine/xine-engine.cpp =================================================================== --- amarok/src/engine/xine/xine-engine.cpp (revision 607419) +++ amarok/src/engine/xine/xine-engine.cpp (working copy) @@ -561,23 +561,22 @@ if( !enable ) { QValueList<int> gains; for( uint x = 0; x < 10; x++ ) - gains << -102; // sets eq gains to zero. + gains << -101; // sets eq gains to zero. setEqualizerParameters( 0, gains ); } } /* - sets the eq params for xine engine - have to rescale eq params to fitting range (adapted from kaffeine) - sideeffect: volume decreases with enabled eq, don't know why, occurs also in kaffeine + sets the eq params for xine engine - have to rescale eq params to fitting range (adapted from kaffeine and xfmedia) preamp pre: (-100..100) - post: (0.2..1.8) - this is not really a preamp but xine offers no preamp so we make a postamp + post: (0.1..1.9) - this is not really a preamp but we use the xine preamp parameter for our normal volume. so we make a postamp. gains pre: (-100..100) - post: (1..100) - range adapted from kaffeine (1 = down, 50 = middle, 100 = up, 0 = off[!!!]) + post: (1..200) - (1 = down, 100 = middle, 200 = up, 0 = off) */ void XineEngine::setEqualizerParameters( int preamp, const QValueList<int> &gains ) @@ -589,18 +588,18 @@ m_intPreamp = preamp; QValueList<int>::ConstIterator it = gains.begin(); - xine_set_param( m_stream, XINE_PARAM_EQ_30HZ, int( (*it )*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_60HZ, int( (*++it)*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_125HZ, int( (*++it)*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_250HZ, int( (*++it)*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_500HZ, int( (*++it)*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_1000HZ, int( (*++it)*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_2000HZ, int( (*++it)*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_4000HZ, int( (*++it)*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_8000HZ, int( (*++it)*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_16000HZ, int( (*++it)*0.49 + 50 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_30HZ, int( (*it )*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_60HZ, int( (*++it)*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_125HZ, int( (*++it)*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_250HZ, int( (*++it)*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_500HZ, int( (*++it)*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_1000HZ, int( (*++it)*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_2000HZ, int( (*++it)*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_4000HZ, int( (*++it)*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_8000HZ, int( (*++it)*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_16000HZ, int( (*++it)*0.995 + 100 ) ); - m_preamp = ( preamp - 0.2 * preamp + 100 ) / 100.0; + m_preamp = ( preamp - 0.1 * preamp + 100 ) / 100.0; setVolume( m_volume ); } Index: amarok/src/equalizersetup.cpp =================================================================== --- amarok/src/equalizersetup.cpp (revision 607419) +++ amarok/src/equalizersetup.cpp (working copy) @@ -115,7 +115,7 @@ // END // BEGIN Band Sliders - const char *bandLabels[] = { "60", "170", "310", "600", "1k", "3k", "6k", "12k", "14k", "16k" }; + const char *bandLabels[] = { "30", "60", "125", "250", "500", "1k", "2k", "4k", "8k", "16k" }; int minWidth = 0; QFontMetrics fm = fontMetrics(); //apparently it's an expensive call Created attachment 18704 [details]
The patch should decrease the volume cutoff significantly.
SVN commit 608130 by markey: The xine equalizer no longer reduces the volume. Patch by Tobias Knieper <tobias.knieper@micekiller.de>. BUG: 127307 M +2 -0 ChangeLog M +15 -16 src/engine/xine/xine-engine.cpp M +1 -1 src/equalizersetup.cpp --- trunk/extragear/multimedia/amarok/ChangeLog #608129:608130 @@ -33,6 +33,8 @@ * Amarok now saves playlists with relative paths by default. BUGFIXES: + * The xine equalizer no longer reduced the volume. Patch by Tobias Knieper + <tobias.knieper@micekiller.de>. (BR 127307) * It's now possible to delete a file from an MTP media device and re-upload it without having to reconnect the device. * Wikipedia links to edit sections are no longer shown. --- trunk/extragear/multimedia/amarok/src/engine/xine/xine-engine.cpp #608129:608130 @@ -561,23 +561,22 @@ if( !enable ) { QValueList<int> gains; for( uint x = 0; x < 10; x++ ) - gains << -102; // sets eq gains to zero. + gains << -101; // sets eq gains to zero. setEqualizerParameters( 0, gains ); } } /* - sets the eq params for xine engine - have to rescale eq params to fitting range (adapted from kaffeine) - sideeffect: volume decreases with enabled eq, don't know why, occurs also in kaffeine + sets the eq params for xine engine - have to rescale eq params to fitting range (adapted from kaffeine and xfmedia) preamp pre: (-100..100) - post: (0.2..1.8) - this is not really a preamp but xine offers no preamp so we make a postamp + post: (0.1..1.9) - this is not really a preamp but we use the xine preamp parameter for our normal volume. so we make a postamp. gains pre: (-100..100) - post: (1..100) - range adapted from kaffeine (1 = down, 50 = middle, 100 = up, 0 = off[!!!]) + post: (1..200) - (1 = down, 100 = middle, 200 = up, 0 = off) */ void XineEngine::setEqualizerParameters( int preamp, const QValueList<int> &gains ) @@ -589,18 +588,18 @@ m_intPreamp = preamp; QValueList<int>::ConstIterator it = gains.begin(); - xine_set_param( m_stream, XINE_PARAM_EQ_30HZ, int( (*it )*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_60HZ, int( (*++it)*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_125HZ, int( (*++it)*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_250HZ, int( (*++it)*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_500HZ, int( (*++it)*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_1000HZ, int( (*++it)*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_2000HZ, int( (*++it)*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_4000HZ, int( (*++it)*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_8000HZ, int( (*++it)*0.49 + 50 ) ); - xine_set_param( m_stream, XINE_PARAM_EQ_16000HZ, int( (*++it)*0.49 + 50 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_30HZ, int( (*it )*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_60HZ, int( (*++it)*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_125HZ, int( (*++it)*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_250HZ, int( (*++it)*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_500HZ, int( (*++it)*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_1000HZ, int( (*++it)*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_2000HZ, int( (*++it)*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_4000HZ, int( (*++it)*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_8000HZ, int( (*++it)*0.995 + 100 ) ); + xine_set_param( m_stream, XINE_PARAM_EQ_16000HZ, int( (*++it)*0.995 + 100 ) ); - m_preamp = ( preamp - 0.2 * preamp + 100 ) / 100.0; + m_preamp = ( preamp - 0.1 * preamp + 100 ) / 100.0; setVolume( m_volume ); } --- trunk/extragear/multimedia/amarok/src/equalizersetup.cpp #608129:608130 @@ -115,7 +115,7 @@ // END // BEGIN Band Sliders - const char *bandLabels[] = { "60", "170", "310", "600", "1k", "3k", "6k", "12k", "14k", "16k" }; + const char *bandLabels[] = { "30", "60", "125", "250", "500", "1k", "2k", "4k", "8k", "16k" }; int minWidth = 0; QFontMetrics fm = fontMetrics(); //apparently it's an expensive call |