Mercurial > hg > xemacs-beta
comparison src/sound.c @ 410:de805c49cfc1 r21-2-35
Import from CVS: tag r21-2-35
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:19:21 +0200 |
parents | b8cc9ab3f761 |
children | 697ef44129c6 |
comparison
equal
deleted
inserted
replaced
409:301b9ebbdf3b | 410:de805c49cfc1 |
---|---|
35 | 35 |
36 #include "device.h" | 36 #include "device.h" |
37 #include "redisplay.h" | 37 #include "redisplay.h" |
38 #include "sysdep.h" | 38 #include "sysdep.h" |
39 | 39 |
40 #ifdef HAVE_UNISTD_H | 40 #include "sysfile.h" |
41 #include <unistd.h> | |
42 #endif | |
43 | 41 |
44 #ifdef HAVE_NATIVE_SOUND | 42 #ifdef HAVE_NATIVE_SOUND |
45 # include <netdb.h> | 43 # include "sysproc.h" |
46 # include "nativesound.h" | 44 # include "nativesound.h" |
47 #endif | 45 #endif |
48 | 46 |
49 #ifdef HAVE_ESD_SOUND | 47 #ifdef HAVE_ESD_SOUND |
50 extern int esd_play_sound_file (char *file, int vol); | 48 extern int esd_play_sound_file (char *file, int vol); |
277 { | 275 { |
278 int looking_for_default = 0; | 276 int looking_for_default = 0; |
279 /* variable `sound' is anything that can be a cdr in sound-alist */ | 277 /* variable `sound' is anything that can be a cdr in sound-alist */ |
280 Lisp_Object new_volume, pitch, duration, data; | 278 Lisp_Object new_volume, pitch, duration, data; |
281 int loop_count = 0; | 279 int loop_count = 0; |
282 int vol, pit, dur, succes; | 280 int vol, pit, dur; |
283 struct device *d = decode_device (device); | 281 struct device *d = decode_device (device); |
284 | 282 |
285 /* NOTE! You'd better not signal an error in here. */ | 283 /* NOTE! You'd better not signal an error in here. */ |
286 | 284 |
287 | 285 |
333 #ifdef HAVE_ESD_SOUND | 331 #ifdef HAVE_ESD_SOUND |
334 if (DEVICE_CONNECTED_TO_ESD_P (d) && STRINGP (sound)) | 332 if (DEVICE_CONNECTED_TO_ESD_P (d) && STRINGP (sound)) |
335 { | 333 { |
336 Extbyte *soundext; | 334 Extbyte *soundext; |
337 Extcount soundextlen; | 335 Extcount soundextlen; |
336 int succes; | |
338 | 337 |
339 TO_EXTERNAL_FORMAT (LISP_STRING, sound, ALLOCA, (soundext, soundextlen), | 338 TO_EXTERNAL_FORMAT (LISP_STRING, sound, ALLOCA, (soundext, soundextlen), |
340 Qbinary); | 339 Qbinary); |
341 | 340 |
342 /* #### ESD uses alarm(). But why should we also stop SIGIO? */ | 341 /* #### ESD uses alarm(). But why should we also stop SIGIO? */ |
353 if ((NILP (Vnative_sound_only_on_console) || DEVICE_ON_CONSOLE_P (d)) | 352 if ((NILP (Vnative_sound_only_on_console) || DEVICE_ON_CONSOLE_P (d)) |
354 && STRINGP (sound)) | 353 && STRINGP (sound)) |
355 { | 354 { |
356 const Extbyte *soundext; | 355 const Extbyte *soundext; |
357 Extcount soundextlen; | 356 Extcount soundextlen; |
357 int succes; | |
358 | 358 |
359 TO_EXTERNAL_FORMAT (LISP_STRING, sound, | 359 TO_EXTERNAL_FORMAT (LISP_STRING, sound, |
360 ALLOCA, (soundext, soundextlen), | 360 ALLOCA, (soundext, soundextlen), |
361 Qbinary); | 361 Qbinary); |
362 /* The sound code doesn't like getting SIGIO interrupts. Unix sucks! */ | 362 /* The sound code doesn't like getting SIGIO interrupts. Unix sucks! */ |