1
mirror of https://github.com/mpv-player/mpv synced 2025-01-09 01:36:25 +01:00

fix mixer

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1821 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
pontscho 2001-09-01 14:44:23 +00:00
parent 3039a4f84a
commit f5fe02f751
2 changed files with 22 additions and 12 deletions

View File

@ -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 mixerMute( void )
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;
}

View File

@ -8,5 +8,6 @@ extern void mixerIncVolume( void );
extern void mixerDecVolume( void );
extern void mixerMute( void );
extern void mixerSetBalance( float b );
extern float mixerGetBalance( void );
#endif