[MPlayer-cygwin] Re: DirectSound Volume patch

deje at miki.hu deje at miki.hu
Fri Jun 10 22:43:43 CEST 2005


6/9/2005 -n, "Erik Lunchpail" <erik_27can at yahoo.com> irta:

>Sorry for the new thread, but i accidently deleted the
>original message. I think there's something wrong with
>your math there. Min volume get set to 0.10%, and Max
>to 100.09%
>
I did not check this but I use this code in mplayer and seems to work
very well... anyway I think it could be rounded to integer numbers, the
fractional part isn't needed as I cannot hear any difference between
99.8 % and 99.9 % for example... of course on linear scale (not the
logarithmic dB scale...) Anyway my frontend rounds it to integer... :)

The algorithm I used has 6.908 factor and as long as I know it is quite
good (most cheaper souncards use factor 4) for converting linear scale
to dB. I dont know if this is needed elsewhere, the win32 waveout volume
setting uses the soundcard's mixer, which should be linearized, and if
not, then it is a problem of the card's drivers. DSound uses dB volume
scale, so it IS needed there. 

Bye
Deje




More information about the MPlayer-cygwin mailing list