comparison lisp/sound.el @ 272:c5d627a313b1 r21-0b34

Import from CVS: tag r21-0b34
author cvs
date Mon, 13 Aug 2007 10:28:48 +0200
parents d44af0c54775
children e11d67e05968
comparison
equal deleted inserted replaced
271:c7b7086b0a39 272:c5d627a313b1
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of 17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ;; General Public License for more details. 19 ;; General Public License for more details.
20 20
21 ;; You should have received a copy of the GNU General Public License 21 ;; You should have received a copy of the GNU General Public License
22 ;; along with XEmacs; see the file COPYING. If not, write to the 22 ;; along with XEmacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, 59 Temple Place - Suite 330, 23 ;; Free Software Foundation, 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA. 24 ;; Boston, MA 02111-1307, USA.
25 25
26 ;;; Synched up with: Not in FSF. 26 ;;; Synched up with: Not in FSF.
27 27
29 29
30 ;;; Code: 30 ;;; Code:
31 (defgroup sound nil 31 (defgroup sound nil
32 "Configure XEmacs sounds and properties" 32 "Configure XEmacs sounds and properties"
33 :group 'environment) 33 :group 'environment)
34 34
35 (defcustom sound-default-alist 35 (defcustom sound-default-alist
36 '((default :sound bass) 36 '((default :sound bass)
37 (undefined-key :sound drum) 37 (undefined-key :sound drum)
38 (undefined-click :sound drum) 38 (undefined-click :sound drum)
39 ;; beginning-of-buffer or end-of-buffer errors. 39 ;; beginning-of-buffer or end-of-buffer errors.
46 (yes-or-no-p :sound quiet) 46 (yes-or-no-p :sound quiet)
47 (auto-save-error :sound whip :volume 100) 47 (auto-save-error :sound whip :volume 100)
48 (no-completion :sound whip) 48 (no-completion :sound whip)
49 (isearch-failed :sound quiet) 49 (isearch-failed :sound quiet)
50 (isearch-quit :sound bass) 50 (isearch-quit :sound bass)
51 ;; QUIT: sound generated by ^G and it's variants. 51 ;; QUIT: sound generated by ^G and its variants.
52 (quit :sound quiet :volume 75) 52 (quit :sound quiet :volume 75)
53 ;; READY: time-consuming task has completed... compile, 53 ;; READY: time-consuming task has completed... compile,
54 ;; cvs-update, etc. 54 ;; cvs-update, etc.
55 (ready :sound cuckoo) 55 (ready :sound cuckoo)
56 ;; WARP: XEmacs has changed the selected-window or frame 56 ;; WARP: XEmacs has changed the selected-window or frame
80 (integer :tag "Pitch")) 80 (integer :tag "Pitch"))
81 (group :inline t 81 (group :inline t
82 (const :format "" :value :duration) 82 (const :format "" :value :duration)
83 (integer :tag "Duration")))))) 83 (integer :tag "Duration"))))))
84 84
85 (defcustom sound-load-alist 85 (defcustom sound-load-alist
86 '((load-sound-file "drum-beep.au" 'drum) 86 '((load-sound-file "drum-beep.au" 'drum)
87 (load-sound-file "quiet-beep.au" 'quiet) 87 (load-sound-file "quiet-beep.au" 'quiet)
88 (load-sound-file "bass-snap.au" 'bass 80) 88 (load-sound-file "bass-snap.au" 'bass 80)
89 (load-sound-file "whip.au" 'whip 70) 89 (load-sound-file "whip.au" 'whip 70)
90 (load-sound-file "cuckoo.au" 'cuckoo) 90 (load-sound-file "cuckoo.au" 'cuckoo)
91 (load-sound-file "yeep.au" 'yeep) 91 (load-sound-file "yeep.au" 'yeep)
92 (load-sound-file "hype.au" 'hype 100) 92 (load-sound-file "hype.au" 'hype 100)
93 ) 93 )
94 "A list of calls to load-sound-file to be processed by load-default-sounds. 94 "A list of calls to load-sound-file to be processed by load-default-sounds.
95 95
96 Reference load-sound-file for more information." 96 Reference load-sound-file for more information."
97 97
98 :group 'sound 98 :group 'sound
99 :type '(repeat (sexp :tag "Sound") 99 :type '(repeat (sexp :tag "Sound")
100 )) 100 ))
101 101
102 (defcustom default-sound-directory (file-name-as-directory 102 (defcustom default-sound-directory (file-name-as-directory
105 :group 'sound 105 :group 'sound
106 :type 'directory 106 :type 'directory
107 ) 107 )
108 108
109 (defcustom sound-ext "" 109 (defcustom sound-ext ""
110 "Filename extensions to complete sound file name with. If more than one 110 "Filename extensions to complete sound file name with. If more than one
111 extension is used, they should be separated by \":\". " 111 extension is used, they should be separated by \":\". "
112 :group 'sound 112 :group 'sound
113 :type 'string) 113 :type 'string)
114 114
115 (defcustom default-sound-directory-list ( list default-sound-directory ) 115 (defcustom default-sound-directory-list ( list default-sound-directory )
172 "Load and install some sound files as beep-types, using 172 "Load and install some sound files as beep-types, using
173 `load-sound-file'. This only works if you're on display 0 of the 173 `load-sound-file'. This only works if you're on display 0 of the
174 console of a machine with native sound support or running a NetAudio 174 console of a machine with native sound support or running a NetAudio
175 server and XEmacs has the necessary sound support compiled in." 175 server and XEmacs has the necessary sound support compiled in."
176 (interactive) 176 (interactive)
177 ;; #### - this should do NOTHING if the sounds can't be played. 177 ;; #### - this should do NOTHING if the sounds can't be played.
178 (message "Loading sounds...") 178 (message "Loading sounds...")
179 (setq sound-alist nil) 179 (setq sound-alist nil)
180 ;; this is where the calls to load-sound-file get done 180 ;; this is where the calls to load-sound-file get done
181 (mapc 'eval sound-load-alist) 181 (mapc 'eval sound-load-alist)
182 (setq sound-alist 182 (setq sound-alist