# HG changeset patch # User ib # Date 1355064551 0 # Node ID d83d2bd5f36588b9774e59e15483aef0a3f4d0b6 # Parent fd7a5b62326dc967ed5673cb716a82b1bf2298e2 Use FFMIN in evSetVolume. Additionally, remove commented code line. diff -r fd7a5b62326d -r d83d2bd5f365 gui/ui/main.c --- 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 ) {