[Mplayer-cvslog] CVS: main/Gui/mplayer mixer.h,1.1,1.2 mixer.c,1.1,1.2

Zoltan Ponekker pontscho at mplayer.dev.hu
Sat Sep 1 16:44:45 CEST 2001


Update of /cvsroot/mplayer/main/Gui/mplayer
In directory mplayer:/var/tmp.root/cvs-serv20290/Gui/mplayer

Modified Files:
	mixer.h mixer.c 
Log Message:
fix mixer

Index: mixer.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/mixer.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mixer.h	25 Aug 2001 21:04:28 -0000	1.1
+++ mixer.h	1 Sep 2001 14:44:22 -0000	1.2
@@ -8,5 +8,6 @@
 extern void  mixerDecVolume( void );
 extern void  mixerMute( void );
 extern void  mixerSetBalance( float b );
+extern float mixerGetBalance( void );
 
 #endif

Index: mixer.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/mixer.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mixer.c	25 Aug 2001 21:04:28 -0000	1.1
+++ mixer.c	1 Sep 2001 14:44:23 -0000	1.2
@@ -1,29 +1,35 @@
 
 #include "play.h"
+#include "../../mixer.h"
+
+//extern void mixer_getvolume( float *l,float *r );
+//extern void mixer_setvolume( float l,float r );
+//extern void mixer_incvolume( void );
+//extern void mixer_decvolume( void );
+//extern float mixer_getbothvolume( void );
 
 float mixerGetVolume( void )
 {
-// ---
-// ---
+ mplShMem->Volume=mixer_getbothvolume();
  return mplShMem->Volume;
 }
 
-void mixerSetVolume( float v )
-{ // 0.0 ... 100.0
-// ---
-printf("%%%%%% mixerSetVolume(%5.3f)  \n",v);
-// ---
+void  mixerSetVolume( float v )
+{
  mplShMem->Volume=v;
+ mixer_setvolume( v,v );
 }
 
 void mixerIncVolume( void )
 {
- mixerSetVolume(  mixerGetVolume() + 1.0f );
+ mixer_incvolume();
+ mixerGetVolume();
 }
 
 void mixerDecVolume( void )
 {
- mixerSetVolume(  mixerGetVolume() - 1.0f );
+ mixer_decvolume();
+ mixerGetVolume();
 }
 
 void mixerMute( void )
@@ -32,8 +38,11 @@
 
 void mixerSetBalance( float b )
 {
-// ---
-// ---
-printf("%%%%%% mixerSetBalance(%5.3f)  \n",b);
+//printf("%%%%%% mixerSetBalance(%5.3f)  \n",b);
  mplShMem->Balance=b;
+}
+
+float mixerGetBalance( void )
+{
+ return mplShMem->Balance;
 }




More information about the MPlayer-cvslog mailing list