diff options
author | Juergen Keil <jkeil@users.sourceforge.net> | 2001-10-06 13:49:49 +0000 |
---|---|---|
committer | Juergen Keil <jkeil@users.sourceforge.net> | 2001-10-06 13:49:49 +0000 |
commit | 7ce6595e8d33b4675fe7680e62428d4492474a8e (patch) | |
tree | 53ce734884ed2732dddda49e4d011d71cda44e88 /src | |
parent | 41dec6804474c55b7b4f89dcf1b70d654a5df002 (diff) | |
download | xine-lib-7ce6595e8d33b4675fe7680e62428d4492474a8e.tar.gz xine-lib-7ce6595e8d33b4675fe7680e62428d4492474a8e.tar.bz2 |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/audio_out/audio_sun_out.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |