# HG changeset patch # User jkeil # Date 1014994445 0 # Node ID 08f739d36ae0a7d00a97026d3c4c46e9f74399d1 # Parent 974cd3ff4f92162d9198cc90cb3c25df3ffc537e Fix a few syntax errors compiling ao_sun.c diff -r 974cd3ff4f92 -r 08f739d36ae0 libao2/ao_sun.c --- 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; }