changeset 7422:69d6da12bc30

*bsd doesn't have info.output_muted - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
author arpi
date Mon, 16 Sep 2002 19:46:02 +0000
parents 0684cad9b204
children ad967766679a
files libao2/ao_sun.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;