X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fsound.c;h=170efbd9ebe28c80df5cb56157dfd75be2d1fb4b;hb=313d1c4d8bd1f94564e5edda76ee6aac3ecb70fd;hp=9e000d4e7e441e821c0affee4b62394fefc6e113;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910;p=chise%2Fxemacs-chise.git- diff --git a/src/sound.c b/src/sound.c index 9e000d4..170efbd 100644 --- a/src/sound.c +++ b/src/sound.c @@ -32,7 +32,6 @@ Boston, MA 02111-1307, USA. */ #include "console-x.h" #endif -#include "commands.h" #include "device.h" #include "redisplay.h" #include "sysdep.h" @@ -69,8 +68,9 @@ Lisp_Object Qnas; DEFUN ("play-sound-file", Fplay_sound_file, 1, 3, "fSound file name: ", /* Play the named sound file on DEVICE's speaker at the specified volume \(0-100, default specified by the `bell-volume' variable). -The sound file must be in the Sun/NeXT U-LAW format except under Linux -where WAV files are also supported. +On Unix machines the sound file must be in the Sun/NeXT U-LAW format +except under Linux where WAV files are also supported. On Microsoft +Windows the sound file must be in WAV format. DEVICE defaults to the selected device. */ (file, volume, device)) @@ -326,14 +326,12 @@ Return t if DEVICE is able to play sound. Defaults to selected device. */ (device)) { - struct device *d = decode_device(device); - #ifdef HAVE_NAS_SOUND - if (DEVICE_CONNECTED_TO_NAS_P (d)) + if (DEVICE_CONNECTED_TO_NAS_P (decode_device (device))) return Qt; #endif #ifdef HAVE_NATIVE_SOUND - if (DEVICE_ON_CONSOLE_P (d)) + if (DEVICE_ON_CONSOLE_P (decode_device (device))) return Qt; #endif return Qnil; @@ -456,7 +454,7 @@ init_native_sound (struct device *d) else { /* We have to call gethostbyname() on the result of gethostname() - because the two aren't guarenteed to be the same name for the + because the two aren't guaranteed to be the same name for the same host: on some losing systems, one is a FQDN and the other is not. Here in the wide wonderful world of Unix it's rocket science to obtain the local hostname in a portable fashion.