changeset 36934:28401584d792

Use the new internal event to set volume. This avoids duplicate code.
author ib
date Fri, 21 Mar 2014 14:49:13 +0000
parents fec1a036882c
children c666dcd51d10
files gui/interface.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Fri Mar 21 14:42:48 2014 +0000
+++ b/gui/interface.c	Fri Mar 21 14:49:13 2014 +0000
@@ -751,9 +751,7 @@
             guiInfo.Balance = (b + 1.0) * 50.0; // transform -1..1 to 0..100
 
             if (guiInfo.Balance != last_balance) {
-                l = guiInfo.Volume * (100.0 - guiInfo.Balance) / 50.0;
-                r = guiInfo.Volume * guiInfo.Balance / 50.0;
-                mixer_setvolume(mixer, FFMIN(l, guiInfo.Volume), FFMIN(r, guiInfo.Volume));
+                uiEvent(ivSetVolume, guiInfo.Volume);
                 last_balance = guiInfo.Balance;
             }
         }