1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <!-- Created by htmlize-1.34 in css mode. -->
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6 <title>08-sounds.el</title>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 <meta name="author" content="Steve Youngs" />
9 <meta name="owner" content="steve@sxemacs.org" />
10 <style type="text/css">
14 background-color: #000000;
17 /* font-lock-comment-face */
21 /* font-lock-keyword-face */
25 /* font-lock-reference-face */
29 /* font-lock-string-face */
35 background-color: inherit;
38 text-decoration: underline;
42 background-color: #FD00FD;
43 text-decoration: underline;
46 background-color: #000000;
47 text-decoration: none;
54 <span class="comment">;; 08-sounds.el --- Sound set up
56 <span class="comment">;; Copyright (C) 2007 - 2020 Steve Youngs
58 <span class="comment">;; Author: Steve Youngs <<a href="mailto:steve@sxemacs.org">steve@sxemacs.org</a>>
59 ;; Maintainer: Steve Youngs <<a href="mailto:steve@sxemacs.org">steve@sxemacs.org</a>>
60 ;; Created: <2007-12-02>
61 ;; Time-stamp: <Thursday Apr 9, 2020 07:39:34 steve>
62 ;; Download: <<a href="https://downloads.sxemacs.org/SYinits">https://downloads.sxemacs.org/SYinits</a>>
63 ;; HTMLised: <<a href="https://www.sxemacs.org/SYinits/08-sounds.html">https://www.sxemacs.org/SYinits/08-sounds.html</a>>
64 ;; Git Repo: git clone https://git.sxemacs.org/syinit
65 ;; Keywords: init, compile
67 <span class="comment">;; This file is part of SYinit
69 <span class="comment">;; Redistribution and use in source and binary forms, with or without
70 ;; modification, are permitted provided that the following conditions
73 ;; 1. Redistributions of source code must retain the above copyright
74 ;; notice, this list of conditions and the following disclaimer.
76 ;; 2. Redistributions in binary form must reproduce the above copyright
77 ;; notice, this list of conditions and the following disclaimer in the
78 ;; documentation and/or other materials provided with the distribution.
80 ;; 3. Neither the name of the author nor the names of any contributors
81 ;; may be used to endorse or promote products derived from this
82 ;; software without specific prior written permission.
84 ;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
85 ;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
86 ;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
87 ;; DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
88 ;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
89 ;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
90 ;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
91 ;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
92 ;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
93 ;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
94 ;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
96 <span class="comment">;;; Commentary:
98 ;; Just sets up sound stuff.
101 <span class="comment">;;; Credits:
103 ;; The HTML version of this file was created with Hrvoje Niksic's
104 ;; htmlize.el which is part of the XEmacs "text-modes" package.
107 <span class="comment">;;; Todo:
111 <span class="comment">;;; Code:
112 ;</span><span class="comment"><span class="reference">:*=======================</span></span><span class="comment">
113 ;</span><span class="comment"><span class="reference">:*</span></span><span class="comment"> Set default sound device
114 </span>(<span class="keyword">when</span> (getenv "<span class="string">DISPLAY</span>") <span class="comment">; skip the lot if not in X11
115 </span> (setq default-audio-device (make-audio-device 'pulse))
116 <span class="comment">;(setq default-audio-device (make-audio-device 'alsa))
117 </span> (init-workers 6)
118 (setq synchronous-sounds nil)
119 (load "<span class="string">sound</span>")
120 (setq bell-volume 100)
121 (<span class="keyword">when</span> (device-sound-enabled-p)
122 (load-sound-file "<span class="string">low-smash</span>" 'auto-save-error)
123 (load-sound-file "<span class="string">bark</span>" 'command-error)
124 (load-sound-file "<span class="string">slap</span>" 'undefined-key)
125 (load-sound-file "<span class="string">slap</span>" 'undefined-click)
126 (load-sound-file "<span class="string">clink</span>" 'no-completion)
127 (load-sound-file "<span class="string">bong</span>" 'y-or-n-p)
128 (load-sound-file "<span class="string">explosion</span>" 'yes-or-no-p)
129 (load-sound-file "<span class="string">drip</span>" 'buffer-bound)
130 (load-sound-file "<span class="string">whip</span>" 'read-only)
131 (load-sound-file "<span class="string">bass-snap</span>" 'default)
132 (load-sound-file "<span class="string">yeep</span>" 'quit)
133 (load-sound-file "<span class="string">drum-beep</span>" 'isearch-failed)
134 (load-sound-file "<span class="string">bass-snap</span>" 'isearch-quit)
135 (load-sound-file "<span class="string">slap</span>" 'ready)
136 (load-sound-file "<span class="string">return</span>" 'warp)
137 (load-sound-file "<span class="string">cuckoo</span>" 'alarm))
139 <span class="comment">;</span><span class="comment"><span class="reference">:*::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::</span></span><span class="comment">
140 </span>(<span class="keyword">if</span> default-audio-device
141 (message "<span class="string">sounds loaded</span>")
142 (message "<span class="string">sounds NOT loaded (OK if this is a TTY)</span>"))
144 <!-- SXEmacs Logo -->
146 <a href="https://www.sxemacs.org/" target="_parent">
147 <img style="padding:0px 5px 0px 0px;border:0;width:88px;height:31px"
148 src="/Images/cbsx.png"
149 title="This page was created entirely in SXEmacs"
150 alt="Created with SXEmacs" />
152 <!-- End SXEmacs Logo -->
153 <!-- Valid XHTML 1.0 -->
154 <a href="http://validator.w3.org/check?uri=https%3a%2f%2fwww.sxemacs.org%2fSYinits%2f08-sounds.html" target="_blank">
155 <img style="padding:0px 5px 0px 10px;border:0;width:88px;height:31px"
156 src="/Images/valid-xhtml10.png"
157 title="Valid XHTML 1.0 Transitional!"
158 alt="Valid XHTML 1.0 Transitional!" />
161 <!-- End Valid XHTML 1.0 -->
163 <h6>Copyright © 2020 Steve Youngs<br />
164 Verbatim copying and distribution is permitted in any medium,
165 providing this notice is preserved.<br />
167 Last modified: Wed Apr 15 18:13:26 AEST 2020