summaryrefslogtreecommitdiffstats
path: root/libao2/ao_sun.c
diff options
context:
space:
mode:
authorjkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-01 14:54:05 +0000
committerjkeil <jkeil@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-01 14:54:05 +0000
commit094f9712df21935d71e9d3ee13307035df1ae100 (patch)
treecf10882319eef8f8a1f9a0286fc85fd34cede191 /libao2/ao_sun.c
parent93e805df2590ed7c349e63673de34640fb6566b7 (diff)
downloadmpv-094f9712df21935d71e9d3ee13307035df1ae100.tar.bz2
mpv-094f9712df21935d71e9d3ee13307035df1ae100.tar.xz
Fix a few syntax errors compiling ao_sun.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4908 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2/ao_sun.c')
-rw-r--r--libao2/ao_sun.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libao2/ao_sun.c b/libao2/ao_sun.c
index 874a0db6d6..f4d94edb41 100644
--- a/libao2/ao_sun.c
+++ b/libao2/ao_sun.c
@@ -223,10 +223,11 @@ static int control(int cmd,int arg){
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 @@ static int control(int cmd,int arg){
}
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,13 +243,14 @@ static int control(int cmd,int arg){
{
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;
}