Mercurial > mplayer.hg
changeset 4907:08f739d36ae0
Fix a few syntax errors compiling ao_sun.c
author | jkeil |
---|---|
date | Fri, 01 Mar 2002 14:54:05 +0000 |
parents | 974cd3ff4f92 |
children | 9b2b09d3ff8b |
files | libao2/ao_sun.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libao2/ao_sun.c Fri Mar 01 14:18:32 2002 +0000 +++ b/libao2/ao_sun.c Fri Mar 01 14:54:05 2002 +0000 @@ -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,13 +243,14 @@ { 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; }