# HG changeset patch # User arpi # Date 1032205562 0 # Node ID 69d6da12bc30ed1b3eba7da6bc3fd478ffc0996c # Parent 0684cad9b204f3ab65c999b7d0f8595e7cf9f1bc *bsd doesn't have info.output_muted - patch by Bj«Órn Sandell diff -r 0684cad9b204 -r 69d6da12bc30 libao2/ao_sun.c --- a/libao2/ao_sun.c Mon Sep 16 19:39:57 2002 +0000 +++ b/libao2/ao_sun.c Mon Sep 16 19:46:02 2002 +0000 @@ -279,14 +279,16 @@ float volume; AUDIO_INITINFO(&info); volume = vol->right > vol->left ? vol->right : vol->left; - info.output_muted = (volume == 0); - if ( !info.output_muted ) { + if ( volume != 0 ) { info.play.gain = volume * AUDIO_MAX_GAIN / 100; if ( vol->right == vol->left ) info.play.balance = AUDIO_MID_BALANCE; else info.play.balance = (vol->right - vol->left + volume) * AUDIO_RIGHT_BALANCE / (2*volume); } +#if !defined (__OpenBSD__) && !defined (__NetBSD__) + info.output_muted = (volume == 0); +#endif ioctl( fd,AUDIO_SETINFO,&info ); close( fd ); return CONTROL_OK;