diff src/sound.c @ 2526:902d5bd9b75c

[xemacs-hg @ 2005-01-28 02:36:11 by ben] Support symlinks under Windows nt.c, fileio.c: Fix sync comments. config.h.in, dired-msw.c, emacs.c, event-msw.c, fileio.c, glyphs.c, lisp.h, nt.c, process-nt.c, realpath.c, sound.c, symsinit.h, sysdep.c, sysfile.h, syswindows.h, win32.c: Add support for treating shortcuts under Windows as symbolic links. Enabled with mswindows-shortcuts-are-links (t by default). Rewrite lots of places to use PATHNAME_CONVERT_OUT, which is moved to sysfile.h. Add PATHNAME_RESOLVE_LINKS, which only does things under Windows. Add profiling section for expand_file_name calls. nt.c, sysdep.c: Unicode-ize. realpath.c: Renamed from readlink_and_correct_case. Fix some problems with Windows implementation due to incorrect understanding of workings of the function. sound.c, ntplay.c, sound.h: Rename play_sound_file to nt_play_sound_file and pass internally-formatted data to it to avoid converting out and back again. text.h: is_c -> is_ascii.
author ben
date Fri, 28 Jan 2005 02:36:28 +0000
parents ecf1ebac70d8
children 7844ab77b582
line wrap: on
line diff
--- a/src/sound.c	Fri Jan 28 02:05:05 2005 +0000
+++ b/src/sound.c	Fri Jan 28 02:36:28 2005 +0000
@@ -1,7 +1,7 @@
 /* Sound functions.
    Copyright (C) 1992, 1993, 1994 Lucid Inc.
    Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-   Copyright (C) 2002 Ben Wing.
+   Copyright (C) 2002, 2004 Ben Wing.
 
 This file is part of XEmacs.
 
@@ -161,20 +161,17 @@
 #ifdef HAVE_NATIVE_SOUND
   if (NILP (Vnative_sound_only_on_console) || DEVICE_ON_CONSOLE_P (d))
     {
+#ifdef WIN32_ANY
+      nt_play_sound_file (file, vol);
+#else
       Extbyte *fileext;
-
-#ifdef WIN32_NATIVE
-      /* #### more garbage.  we should be passing the internal file name
-	 to play_sound_file. */
-      LISP_STRING_TO_EXTERNAL (file, fileext, Qmswindows_tstr);
-#else
-      LISP_STRING_TO_EXTERNAL (file, fileext, Qfile_name);
-#endif
+      LISP_PATHNAME_CONVERT_OUT (file, fileext);
       /* The sound code doesn't like getting SIGIO interrupts.
 	 Unix sucks! */
       stop_interrupts ();
       play_sound_file (fileext, vol);
       start_interrupts ();
+#endif /* WIN32_NATIVE */
       QUIT;
     }
 #endif /* HAVE_NATIVE_SOUND */