Mercurial > mplayer.hg
changeset 35545:d83d2bd5f365
Use FFMIN in evSetVolume.
Additionally, remove commented code line.
author | ib |
---|---|
date | Sun, 09 Dec 2012 14:49:11 +0000 |
parents | fd7a5b62326d |
children | cd2c85083fdd |
files | gui/ui/main.c |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/ui/main.c Sun Dec 09 14:44:58 2012 +0000 +++ b/gui/ui/main.c Sun Dec 09 14:49:11 2012 +0000 @@ -56,6 +56,7 @@ #include "m_property.h" #include "mp_core.h" #include "mpcommon.h" +#include "libavutil/common.h" #define GUI_REDRAW_WAIT 375 @@ -290,10 +291,7 @@ { float l = guiInfo.Volume * ( ( 100.0 - guiInfo.Balance ) / 50.0 ); float r = guiInfo.Volume * ( ( guiInfo.Balance ) / 50.0 ); - if ( l > guiInfo.Volume ) l=guiInfo.Volume; - if ( r > guiInfo.Volume ) r=guiInfo.Volume; -// printf( "!!! v: %.2f b: %.2f -> %.2f x %.2f\n",guiInfo.Volume,guiInfo.Balance,l,r ); - mixer_setvolume( mixer,l,r ); + mixer_setvolume( mixer,FFMIN(l,guiInfo.Volume),FFMIN(r,guiInfo.Volume) ); } if ( osd_level ) {