220 |
Lisp_Object Qsound; |
Lisp_Object Qsound; |
221 |
Lisp_Object Qplay_sound_functions; |
Lisp_Object Qplay_sound_functions; |
222 |
|
|
223 |
/* These are set during `play-sound' so that sound_cleanup has |
/* These are set during `play-sound-internal' so that sound_cleanup has |
224 |
access to them. */ |
access to them. */ |
225 |
|
|
226 |
struct sound_device *current_sound_device; |
struct sound_device *current_sound_device; |
371 |
} |
} |
372 |
|
|
373 |
|
|
374 |
/* Function installed by play-sound with record_unwind_protect. */ |
/* Function installed by play-sound-internal with record_unwind_protect. */ |
375 |
|
|
376 |
static Lisp_Object |
static Lisp_Object |
377 |
sound_cleanup (arg) |
sound_cleanup (arg) |
389 |
} |
} |
390 |
|
|
391 |
|
|
392 |
DEFUN ("play-sound", Fplay_sound, Splay_sound, 1, 1, 0, |
DEFUN ("play-sound-internal", Fplay_sound_internal, Splay_sound_internal, 1, 1, 0, |
393 |
doc: /* Play sound SOUND. |
doc: /* Play sound SOUND. |
|
SOUND is a list of the form `(sound KEYWORD VALUE...)'. |
|
|
The following keywords are recognized: |
|
394 |
|
|
395 |
:file FILE - read sound data from FILE. If FILE isn't an |
Internal use only, use `play-sound' instead. */) |
|
absolute file name, it is searched in `data-directory'. |
|
|
|
|
|
:data DATA - read sound data from string DATA. |
|
|
|
|
|
Exactly one of :file or :data must be present. |
|
|
|
|
|
:volume VOL - set volume to VOL. VOL must an integer in the |
|
|
range 0..100 or a float in the range 0..1.0. If not specified, |
|
|
don't change the volume setting of the sound device. |
|
|
|
|
|
:device DEVICE - play sound on DEVICE. If not specified, |
|
|
a system-dependent default device name is used. */) |
|
396 |
(sound) |
(sound) |
397 |
Lisp_Object sound; |
Lisp_Object sound; |
398 |
{ |
{ |
940 |
Qplay_sound_functions = intern ("play-sound-functions"); |
Qplay_sound_functions = intern ("play-sound-functions"); |
941 |
staticpro (&Qplay_sound_functions); |
staticpro (&Qplay_sound_functions); |
942 |
|
|
943 |
defsubr (&Splay_sound); |
defsubr (&Splay_sound_internal); |
944 |
} |
} |
945 |
|
|
946 |
|
|