diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-09-16 19:46:02 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-09-16 19:46:02 +0000 |
commit | 86349f9208d246610a21ce7458de7a706650fe9f (patch) | |
tree | b91e73263b0a5ec5b173b7e217c9fef34d9667b3 /libao2 | |
parent | d1b505683a5cbc1eec74e77fd9f73d35e9fe932b (diff) |
*bsd doesn't have info.output_muted - patch by Björn Sandell <biorn@dce.chalmers.se>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7423 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2')
-rw-r--r-- | libao2/ao_sun.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libao2/ao_sun.c b/libao2/ao_sun.c index 0a6e6979c8..1994801616 100644 --- a/libao2/ao_sun.c +++ b/libao2/ao_sun.c @@ -279,14 +279,16 @@ static int control(int cmd,int arg){ 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; |