[Mplayer-cvslog] CVS: main mplayer.c,1.547,1.548

Arpi of Ize arpi at mplayerhq.hu
Wed Aug 21 22:44:31 CEST 2002


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv8630

Modified Files:
	mplayer.c 
Log Message:
new slave volume command done :
"volume <x> <abs 0|1>"
where :
        abs optionnal,
                0 : relative, x > 0 increase else decrease
                1 : static, x = volume, 0 to 100

for sofware plugin, remember to / 2.55 before commiting

patch by "j.a.l" <j.a.l at free.fr>


Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.547
retrieving revision 1.548
diff -u -r1.547 -r1.548
--- mplayer.c	15 Aug 2002 22:52:50 -0000	1.547
+++ mplayer.c	21 Aug 2002 20:44:28 -0000	1.548
@@ -2380,10 +2380,20 @@
       } break;
     case MP_CMD_VOLUME :  {
       int v = cmd->args[0].v.i;
+
+		// start change for absolute volume value
+		int abs = (cmd->nargs > 1) ? cmd->args[1].v.i : 0;
+		
+		if( abs )
+		{
+			mixer_setvolume( (float)v, (float)v );
+		} else {
       if(v > 0)
 	mixer_incvolume();
       else
 	mixer_decvolume();
+		}
+	  
 #ifdef USE_OSD
       if(osd_level){
 	osd_visible=sh_video->fps; // 1 sec




More information about the MPlayer-cvslog mailing list