comparison 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
comparison
equal deleted inserted replaced
2525:52f00344a629 2526:902d5bd9b75c
1 /* Sound functions. 1 /* Sound functions.
2 Copyright (C) 1992, 1993, 1994 Lucid Inc. 2 Copyright (C) 1992, 1993, 1994 Lucid Inc.
3 Copyright (C) 1994, 1995 Free Software Foundation, Inc. 3 Copyright (C) 1994, 1995 Free Software Foundation, Inc.
4 Copyright (C) 2002 Ben Wing. 4 Copyright (C) 2002, 2004 Ben Wing.
5 5
6 This file is part of XEmacs. 6 This file is part of XEmacs.
7 7
8 XEmacs is free software; you can redistribute it and/or modify it 8 XEmacs is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by the 9 under the terms of the GNU General Public License as published by the
159 #endif /* HAVE_ESD_SOUND */ 159 #endif /* HAVE_ESD_SOUND */
160 160
161 #ifdef HAVE_NATIVE_SOUND 161 #ifdef HAVE_NATIVE_SOUND
162 if (NILP (Vnative_sound_only_on_console) || DEVICE_ON_CONSOLE_P (d)) 162 if (NILP (Vnative_sound_only_on_console) || DEVICE_ON_CONSOLE_P (d))
163 { 163 {
164 #ifdef WIN32_ANY
165 nt_play_sound_file (file, vol);
166 #else
164 Extbyte *fileext; 167 Extbyte *fileext;
165 168 LISP_PATHNAME_CONVERT_OUT (file, fileext);
166 #ifdef WIN32_NATIVE
167 /* #### more garbage. we should be passing the internal file name
168 to play_sound_file. */
169 LISP_STRING_TO_EXTERNAL (file, fileext, Qmswindows_tstr);
170 #else
171 LISP_STRING_TO_EXTERNAL (file, fileext, Qfile_name);
172 #endif
173 /* The sound code doesn't like getting SIGIO interrupts. 169 /* The sound code doesn't like getting SIGIO interrupts.
174 Unix sucks! */ 170 Unix sucks! */
175 stop_interrupts (); 171 stop_interrupts ();
176 play_sound_file (fileext, vol); 172 play_sound_file (fileext, vol);
177 start_interrupts (); 173 start_interrupts ();
174 #endif /* WIN32_NATIVE */
178 QUIT; 175 QUIT;
179 } 176 }
180 #endif /* HAVE_NATIVE_SOUND */ 177 #endif /* HAVE_NATIVE_SOUND */
181 178
182 return Qnil; 179 return Qnil;