diff options
Diffstat (limited to 'src/sound.c')
-rw-r--r-- | src/sound.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/sound.c b/src/sound.c index c1f869045f5..2b8715010e7 100644 --- a/src/sound.c +++ b/src/sound.c @@ -2,6 +2,8 @@ Copyright (C) 1998-1999, 2001-2019 Free Software Foundation, Inc. +Author: Gerd Moellmann <gerd@gnu.org> + This file is part of GNU Emacs. GNU Emacs is free software: you can redistribute it and/or modify @@ -17,8 +19,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ -/* Written by Gerd Moellmann <gerd@gnu.org>. Tested with Luigi's - driver on FreeBSD 2.2.7 with a SoundBlaster 16. */ +/* Tested with Luigi's driver on FreeBSD 2.2.7 with a SoundBlaster 16. */ /* Modified by Ben Key <Bkey1@tampabay.rr.com> to add a partial @@ -384,9 +385,9 @@ parse_sound (Lisp_Object sound, Lisp_Object *attrs) /* Volume must be in the range 0..100 or unspecified. */ if (!NILP (attrs[SOUND_VOLUME])) { - if (INTEGERP (attrs[SOUND_VOLUME])) + if (FIXNUMP (attrs[SOUND_VOLUME])) { - EMACS_INT volume = XINT (attrs[SOUND_VOLUME]); + EMACS_INT volume = XFIXNUM (attrs[SOUND_VOLUME]); if (! (0 <= volume && volume <= 100)) return 0; } @@ -1399,8 +1400,8 @@ Internal use only, use `play-sound' instead. */) /* Set up a device. */ current_sound_device->file = attrs[SOUND_DEVICE]; - if (INTEGERP (attrs[SOUND_VOLUME])) - current_sound_device->volume = XFASTINT (attrs[SOUND_VOLUME]); + if (FIXNUMP (attrs[SOUND_VOLUME])) + current_sound_device->volume = XFIXNAT (attrs[SOUND_VOLUME]); else if (FLOATP (attrs[SOUND_VOLUME])) current_sound_device->volume = XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100; @@ -1422,9 +1423,9 @@ Internal use only, use `play-sound' instead. */) file = Fexpand_file_name (attrs[SOUND_FILE], Vdata_directory); file = ENCODE_FILE (file); - if (INTEGERP (attrs[SOUND_VOLUME])) + if (FIXNUMP (attrs[SOUND_VOLUME])) { - ui_volume_tmp = XFASTINT (attrs[SOUND_VOLUME]); + ui_volume_tmp = XFIXNAT (attrs[SOUND_VOLUME]); } else if (FLOATP (attrs[SOUND_VOLUME])) { |