changeset 1820:a04b2f92bd14

fix mixer
author pontscho
date Sat, 01 Sep 2001 14:44:23 +0000
parents b5b89f8efc5f
children 3c65d5675676
files Gui/mplayer/mixer.c Gui/mplayer/mixer.h
diffstat 2 files changed, 22 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/mplayer/mixer.c	Sat Sep 01 13:38:32 2001 +0000
+++ b/Gui/mplayer/mixer.c	Sat Sep 01 14:44:23 2001 +0000
@@ -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;
+}
--- a/Gui/mplayer/mixer.h	Sat Sep 01 13:38:32 2001 +0000
+++ b/Gui/mplayer/mixer.h	Sat Sep 01 14:44:23 2001 +0000
@@ -8,5 +8,6 @@
 extern void  mixerDecVolume( void );
 extern void  mixerMute( void );
 extern void  mixerSetBalance( float b );
+extern float mixerGetBalance( void );
 
 #endif