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

D Richard Felker III dalias at aerifal.cx
Tue Nov 16 02:30:57 CET 2004


On Mon, Nov 15, 2004 at 09:28:58PM +0000, Ed Wildgoose wrote:
> 
> >>I do agree that using a dB scale everywhere is a nice idea in theory, 
> >>but it needs a careful implementation in practice.  I talked the 
> >>bio2jack author into adding such a volume control to his Jack output 
> >>layer and he immediately found that his volume control in XMMS then 
> >>became just far too sensitive when trying to slide it a little with the 
> >>mouse.  The linear was better in practice because he could get some 
> >>control where it was needed, but still turn it really low if required.  
> >>I guess a kind of "half" log measure would be ideal...  Perhaps less of 
> >
> >wtf? half log? no, just use a smaller scale, e.g. 0.5 or 0.25 dB
> >instead of 1 dB at a time. but i really doubt that's necessary..
> 
> I was talking about the issue that usually the on screen display runs 
> from 0-100.  This then has to map to some internal range (log scale in 
> your design).  I persuaded the bio2jack author to experiment with using 
> the 1-100 scale to mean number of of dB attenuated, and he found it very 
> hard to control volume.  Same even with 40dB of range.

well this is exactly the way all "serious" home entertainment
equipment does it... (with dB scale)

> Do you see what I am getting at though?  It's a user interface issue, 
> not a theoretical one.  I personally like the idea of a dB volume scale.

well the dB scale is the only thing at all intuitive or standardized.
anything else is just a matter of trial-and-error unless the user
knows the exact formula being used, and typically (s)he doesn't. if
you use a sane, standardized scale, then someone can know that the
same numbers that work for their car stereo/home theater receiver/etc.
also work for mplayer.

> By the way, are you really throwing away a large chunk of your DAC's 
> dynamic range most of the time?  Do you have no outboard volume control 
> at all?  Just curious...

actually i have a the master volume control, but here's the problem. i
have to turn it all the way up to 100 to hear most dvds, and then if
there's some idiotic insanely loud gunshot or explosion or something
it will blow up my speakers!! (or if i forget to turn it back down
before playing an mp3) actually not quite...the speakers can handle
the max with most music, but i wouldn't be so confident about
more temporally-localized peaks. this situation is very uncool,
because even if the speakers don't blow up it's totally inconsiderate
to the people living above me for such insanely loud peaks to go off.

the proper solution of course would be a soft-clipping volume filter.
but af_volume sucks too much to do this except with float mode, which
is totally broken.

as far as the dac's dynamic range, it was already thrown away when the
idiotic studio decided to master the dvd only using 8-10 bits for 95%
of the time. the only time i lose any range is on these awful peaks,
and i'm happy to lose that...

rich




More information about the MPlayer-dev-eng mailing list