Bug 120579 - KMPlayer resets volume when using Xine engine
Summary: KMPlayer resets volume when using Xine engine
Status: ASSIGNED
Alias: None
Product: kmplayer
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Koos Vriezen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-22 01:47 UTC by Dima Ryazanov
Modified: 2006-11-25 21:04 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 Dima Ryazanov 2006-01-22 01:47:23 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 4.0.2 (Gentoo 4.0.2-r3, pie-8.7.8) 
OS:                Linux

I selected Xine as the KMPlayer engine.
With default settings, when it starts playing something, Xine always resets the PCM volume to 100% or close to that. (Normally, I have it at 50%, so that makes the sound very loud.)

I tried to change Xine settings, and noticed that it doesn't happen if I unselect "audio.alsa_hw_mixer", or set "audio.device.alsa_mixer_name" to "Master", instead of "PCM". I'm not completely sure what this means, though. (What exactly is PCM? Why is there sound if Master is at 0%? And no sound with PCM at 0%...)

I think that KMPlayer should set some sane values for Xine configuration.

Also, it seems that KMPlayer doesn't update its own volume slider when the volume is changed by some other program.
Comment 1 Koos Vriezen 2006-01-22 14:45:19 UTC
There is a config option 'Auto set volume on start' that is used by the Xine backend to set the volume according the volume slider.
Volume setting is a bit of a mesh currently. The volume slider in the controlpanel, asks backend to adjust volume. The one in the popdown menu, asks kmix to set the volume (if running). Only the latter has a notion if somewhere else the volume has changed.
The real problem is that KDE hasn't got API's for this. One can only use either kmix, or duplicate all its code. Probably a matter of waiting for KDE4 ..
Comment 2 Thomas McGuire 2006-11-14 14:15:35 UTC
Please don't enable the option 'Auto set volume on start' by default then!
I use an external amplifier, and when KMPlayer resets the PCM volume to 100%, it is unbearable loud (normally PCM is set to 10%).

KMPlayer should, by default, under no circumstances, automatically increase the volume of any alsa channel.
Comment 3 Hackeron 2006-11-25 00:50:26 UTC
Yes, this is awful - at 3am, I had my powered monitors set to 3%, right clicked on a movie and clicked properties and my volume shot up to 90% because there is a preview tab that uses kmplayer - very bad :(
Comment 4 Koos Vriezen 2006-11-25 01:34:15 UTC
I hope you learned your lesson when installing an app. to check out what it does. I guess I could change the defaults (I hope I remember it, but leave this BR open until then). I think best is to lower the initial volume to 20% or so, to avoid that touching the volume bar a little bit changes the volume a lot more.
If however one of you didn't install kmplayer explicitly, and where so supprised, like the poster of #3, then I would suggest to also notify your distribution packager. Because its his/her task to make a consistant desktop. He/she may not be aware of the issue, and for a packager its really simple to enable/disable a certain option by default (in the global kmplayerrc). I know of Debian having set the backends all to Xine for example.
Comment 5 Koos Vriezen 2006-11-25 16:06:51 UTC
SVN commit 607727 by vriezen:

Defaults volume to 20%

CCBUG: 120579


 M  +1 -1      kmplayerconfig.cpp  


--- trunk/extragear/multimedia/kmplayer/src/kmplayerconfig.cpp #607726:607727
@@ -272,7 +272,7 @@
     sub_urllist = m_config->readListEntry (strSubURLList, ';');
     prefbitrate = m_config->readNumEntry (strPrefBitRate, 512);
     maxbitrate = m_config->readNumEntry (strMaxBitRate, 1024);
-    volume = m_config->readNumEntry (strVolume, 80);
+    volume = m_config->readNumEntry (strVolume, 20);
     contrast = m_config->readNumEntry (strContrast, 0);
     brightness = m_config->readNumEntry (strBrightness, 0);
     hue = m_config->readNumEntry (strHue, 0);
Comment 6 Thomas McGuire 2006-11-25 18:42:57 UTC
>I hope you learned your lesson when installing an app. to check out what it >does. 
Well KMPlayer is the ONLY app which changes ALSA channels automatically. Xine itself even does not do it automatically. I DID learn my lesson, I do not turn on the speakers when installing an OS, because the OS usually sets all volume channels to 100%. However, once after setting the volume of all channels correctly, this is not an issue anymore, because all apps behave and do not change that (except KMPlayer).

Still, xine is not as good as amarok, because amarok sets the volume internally, while xine changes the mixer settings when changing the volume. See
http://sourceforge.net/tracker/index.php?func=detail&aid=1322093&group_id=9655&atid=109655

However, both amarok and xine do not change the volume automatically, while KMPlayer does.


>I guess I could change the defaults (I hope I remember it, but leave this BR >open until then). I think best is to lower the initial volume to 20% or so, to >avoid that touching the volume bar a little bit changes the volume a lot more. 
Well I don't care if the default volume is 20% or 80%, the default volume should simply be the volume currently set! Why do you want to change the current volume at all?? There is a reason I set the volume to a specific level. Why not simply use the volume the user specified in the mixer settings?
Basically, not setting the 'Auto set volume on start' option by default would solve all problems. Out of curiosity, why is this option needed at all? Is there a usecase?

>If however one of you didn't install kmplayer explicitly, and where so >supprised, like the poster of #3, then I would suggest to also notify your >distribution packager. Because its his/her task to make a consistant desktop. >He/she may not be aware of the issue, and for a packager its really simple to >enable/disable a certain option by default (in the global kmplayerrc). I know >of Debian having set the backends all to Xine for example. 
I disagree, this is not a distribution issue. The apps should have a sensible defaults. Changing the volume of a channel behind the user's back is not sensible. I don't see why distributions should patch that.

Sorry if I sounded a bit harsh.
Comment 7 Hackeron 2006-11-25 21:04:02 UTC
So this SVN commit makes kmplayer change the volume to 20 instead of 80? -- What does that fix?

I'm confused, so if I'm using 3/100 most of the time because I have powered monitors it still increases volume to deafening levels and now on my other box where I have a volume control on the speakers themselves decreases volume to 20?