[MPlayer-dev-eng] [PATCH] forceable software volume control

The Wanderer inverseparadox at comcast.net
Fri Nov 5 22:43:13 CET 2004


Reimar Döffinger wrote:

> On Fri, Nov 05, 2004 at 01:14:19PM -0500, The Wanderer wrote:

>> Nonetheless, I don't remember if I'd read the code (I have now, and
>> it looks comparatively simple; I don't even see where or how the 50
>> and 200 values are coded), and had misread even the man-page
>> description; I was operating with a working assuption of 100 as max
>> (and that raising the number would have no effect on the present
>> volume, but only on the range within which one can change the
>> volume). 100l-or-so equivalent to me for that, unless I'm now
>> misunderstanding things even worse, but now I'm not sure I *do*
>> understand things, because if the situation as I now think I 
>> understand it is correct then I don't know how my previous
>> objections could have failed to be reacted to as quite plainly
>> insane.
> 
> The -vol-normal parameter does not change the volume, it changes the 
> range in which you can change it.

That was my original understanding of that part, as best I remember it,
and it's good to know that I was correct.

> The range limits of 10 and 200 are actually arbitrary, only e.g. 0
> zero must not be allowed (division by zero is bad ;-) ).

Acknowledged, and thank you. I'd note that since having soft_vol_normal
equal to 0 would cause problems, it would probably be good to have a
check somewhere to do something else (probably fail out) if a user
specifies that value.

> As also mentioned in the manpage part of my updated patch, values
> above 100 can cause weird behavior, because MPlayer then is told that
> the current volume was e.g. 200%, and upon changing the volume it
> will always drop into the right range...

Yes, now that you mention it I do remember that comment; I almost asked
about it at one point. (My brain hasn't been working more than about 90%
correctly at 'most any given time since about last Wednesday.) I do
think that it might be a good idea to restrict the valid range for
softvol-normal to be >0 and <=100, both in the documentation and in the
code, but if not then at the very least it would seem appropriate to
explain in the documentation what MPlayer will do if presented with a
value out of range... which you have just done here for me.

> In principle MPlayers 0% - 100% range of volume is mapped to a 0% -
> 100/softvol-norm% range for the real volume change.

Useful to have that stated explicitly, at least in my current state of
mental competence. Would it be "getting into too much detail" to mention
that little 'equation' in the man page? I gathered something vaguely
along those lines from the form in the patch you have, but the specifics
can be nice to know.

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

A government exists to serve its citizens, not to control them.




More information about the MPlayer-dev-eng mailing list