Mercurial > hg > xemacs-beta
comparison lisp/prim/sound.el @ 138:6608ceec7cf8 r20-2b3
Import from CVS: tag r20-2b3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:31:46 +0200 |
parents | b980b6286996 |
children | 585fb297b004 |
comparison
equal
deleted
inserted
replaced
137:cae984061f40 | 138:6608ceec7cf8 |
---|---|
126 The sound file must be in the Sun/NeXT U-LAW format, except on Linux, | 126 The sound file must be in the Sun/NeXT U-LAW format, except on Linux, |
127 where .wav files are also supported by the sound card drivers." | 127 where .wav files are also supported by the sound card drivers." |
128 (interactive "fSound file name: \n\ | 128 (interactive "fSound file name: \n\ |
129 SSymbol to name this sound: \n\ | 129 SSymbol to name this sound: \n\ |
130 nVolume (0 for default): ") | 130 nVolume (0 for default): ") |
131 (or (symbolp sound-name) (error "sound-name not a symbol")) | 131 (unless (symbolp sound-name) |
132 (or (null volume) (integerp volume) (error "volume not an integer or nil")) | 132 (error "sound-name not a symbol")) |
133 (unless (null volume) | |
134 (integerp volume) (error "volume not an integer or nil")) | |
133 (let (buf | 135 (let (buf |
134 data | 136 data |
135 (file (locate-file filename default-sound-directory-list sound-ext))) | 137 (file (locate-file filename default-sound-directory-list sound-ext))) |
138 (unless file | |
139 (error "Couldn't load sound file %s" filename)) | |
136 (unwind-protect | 140 (unwind-protect |
137 (save-excursion | 141 (save-excursion |
138 (set-buffer (setq buf (get-buffer-create " *sound-tmp*"))) | 142 (set-buffer (setq buf (get-buffer-create " *sound-tmp*"))) |
139 (buffer-disable-undo (current-buffer)) | 143 (buffer-disable-undo (current-buffer)) |
140 (erase-buffer) | 144 (erase-buffer) |