Mercurial > hg > xemacs-beta
comparison lisp/sound.el @ 398:74fd4e045ea6 r21-2-29
Import from CVS: tag r21-2-29
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:13:30 +0200 |
parents | bbff43aa5eb7 |
children |
comparison
equal
deleted
inserted
replaced
397:f4aeb21a5bad | 398:74fd4e045ea6 |
---|---|
103 "Default directory to load a sound file from." | 103 "Default directory to load a sound file from." |
104 :group 'sound | 104 :group 'sound |
105 :type 'directory | 105 :type 'directory |
106 ) | 106 ) |
107 | 107 |
108 ;; #### This should really be a list. --hniksic | |
108 (defcustom sound-extension-list (if (or (eq system-type 'cygwin32) | 109 (defcustom sound-extension-list (if (or (eq system-type 'cygwin32) |
109 (eq system-type 'windows-nt)) | 110 (eq system-type 'windows-nt)) |
110 ".wav:" ".au:") | 111 ".wav:" ".au:") |
111 "Filename extensions to complete sound file name with. If more than one | 112 "Filename extensions to complete sound file name with. If more than one |
112 extension is used, they should be separated by \":\". " | 113 extension is used, they should be separated by \":\". " |
142 (error "sound-name not a symbol")) | 143 (error "sound-name not a symbol")) |
143 (unless (or (null volume) (integerp volume)) | 144 (unless (or (null volume) (integerp volume)) |
144 (error "volume not an integer or nil")) | 145 (error "volume not an integer or nil")) |
145 (let (buf | 146 (let (buf |
146 data | 147 data |
147 (file (locate-file filename default-sound-directory-list sound-extension-list))) | 148 (file (locate-file filename default-sound-directory-list |
149 sound-extension-list))) | |
148 (unless file | 150 (unless file |
149 (error "Couldn't load sound file %s" filename)) | 151 (error "Couldn't load sound file %s" filename)) |
150 (unwind-protect | 152 (unwind-protect |
151 (save-excursion | 153 (save-excursion |
152 (set-buffer (setq buf (get-buffer-create " *sound-tmp*"))) | 154 (set-buffer (setq buf (get-buffer-create " *sound-tmp*"))) |