From 7ce6595e8d33b4675fe7680e62428d4492474a8e Mon Sep 17 00:00:00 2001 From: Juergen Keil Date: Sat, 6 Oct 2001 13:49:49 +0000 Subject: Rescale AO_PROP_*_VOL values from [0..100] range to Sun's [0..255] range. CVS patchset: 749 CVS date: 2001/10/06 13:49:49 --- src/audio_out/audio_sun_out.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/audio_out/audio_sun_out.c b/src/audio_out/audio_sun_out.c index c04996675..e8b68ee00 100644 --- a/src/audio_out/audio_sun_out.c +++ b/src/audio_out/audio_sun_out.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_sun_out.c,v 1.12 2001/09/28 10:19:08 jkeil Exp $ + * $Id: audio_sun_out.c,v 1.13 2001/10/06 13:49:49 jkeil Exp $ */ #ifdef HAVE_CONFIG_H @@ -421,7 +421,7 @@ static int ao_sun_get_property (ao_driver_t *this_gen, int property) { case AO_PROP_PCM_VOL: if (ioctl(this->audio_fd, AUDIO_GETINFO, &info) < 0) return 0; - return info.play.gain; + return info.play.gain * 100 / AUDIO_MAX_GAIN; #if !defined(__NetBSD__) /* audio_info.output_muted is missing on NetBSD */ case AO_PROP_MUTE_VOL: if (ioctl(this->audio_fd, AUDIO_GETINFO, &info) < 0) @@ -447,7 +447,7 @@ static int ao_sun_set_property (ao_driver_t *this_gen, int property, int value) case AO_PROP_MIXER_VOL: break; case AO_PROP_PCM_VOL: - info.play.gain = value; + info.play.gain = value * AUDIO_MAX_GAIN / 100; if (ioctl(this->audio_fd, AUDIO_SETINFO, &info) < 0) return ~value; return value; -- cgit v1.2.3