Update of /cvsroot/beepmp/bmp/beep
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14341
Modified Files:
controlsocket.c
Log Message:
* controlsocket.c (ctrlsocket_func): Fix crash when output plugin returns
zero volume for one channel, and does not return the other i.e. -1 (#331,
Mike Lundy).
Index: controlsocket.c
===================================================================
RCS file: /cvsroot/beepmp/bmp/beep/controlsocket.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** controlsocket.c 11 Aug 2005 07:15:09 -0000 1.39
--- controlsocket.c 4 Sep 2005 22:20:00 -0000 1.40
***************
*** 375,379 ****
case CMD_GET_BALANCE:
input_get_volume(&v[0], &v[1]);
! if (v[0] > v[1])
b = -100 + ((v[1] * 100) / v[0]);
else if (v[1] > v[0])
--- 375,381 ----
case CMD_GET_BALANCE:
input_get_volume(&v[0], &v[1]);
! if (v[0] < 0 || v[1] < 0)
! b = 0;
! else if (v[0] > v[1])
b = -100 + ((v[1] * 100) / v[0]);
else if (v[1] > v[0])
|