[Mplayer-cvslog] CVS: main/libao2 ao_sun.c,1.13,1.14

Jürgen Keil jkeil at mplayer.dev.hu
Fri Mar 1 15:54:08 CET 2002


Update of /cvsroot/mplayer/main/libao2
In directory mplayer:/var/tmp.root/cvs-serv6500

Modified Files:
	ao_sun.c 
Log Message:
Fix a few syntax errors compiling ao_sun.c


Index: ao_sun.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_sun.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ao_sun.c	21 Feb 2002 16:02:26 -0000	1.13
+++ ao_sun.c	1 Mar 2002 14:54:05 -0000	1.14
@@ -223,10 +223,11 @@
 	fd=open( sun_mixer_device,O_RDONLY );
 	if ( fd != -1 )
 	{
+	    ao_control_vol_t *vol = (ao_control_vol_t *)arg;
 	    struct audio_info info;
 	    ioctl( fd,AUDIO_GETINFO,&info);
-	    ((ao_control_vol_t*)(arg))->left=info.play.gain * 100. / AUDIO_MAX_GAIN;
-	    ((ao_control_vol_t*)(arg))->=info.play.gain * 100. / AUDIO_MAX_GAIN;
+	    vol->left=info.play.gain * 100. / AUDIO_MAX_GAIN;
+	    vol->right=info.play.gain * 100. / AUDIO_MAX_GAIN;
 	    close( fd );
 	    return CONTROL_OK;
 	}	
@@ -234,6 +235,7 @@
     }
     case AOCONTROL_SET_VOLUME:
     {
+	ao_control_vol_t *vol = (ao_control_vol_t *)arg;
         int fd,v,cmd,devs;
 
 	fd=open( sun_mixer_device,O_RDONLY );
@@ -241,12 +243,13 @@
 	{
 	    struct audio_info info;
 	    AUDIO_INITINFO(&info);
-	    info.play.gain = (r+l) * AUDIO_MAX_GAIN / 100 / 2;
+	    info.play.gain = (vol->right+vol->left) * AUDIO_MAX_GAIN / 100 / 2;
 	    ioctl( fd,AUDIO_SETINFO,&info );
 	    close( fd );
 	    return CONTROL_OK;
 	}	
 	return CONTROL_ERROR;
+    }
     }
     return CONTROL_UNKNOWN;
 }




More information about the MPlayer-cvslog mailing list