Add HTML versions of my init files
[website] / SYinits / 08-sounds.html
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">
5   <head>
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">
11     <!--
12       body {
13         color: #ffffff;
14         background-color: #000000;
15       }
16       .comment {
17         /* font-lock-comment-face */
18         color: #87ceeb;
19       }
20       .keyword {
21         /* font-lock-keyword-face */
22         color: #fa8072;
23       }
24       .reference {
25         /* font-lock-reference-face */
26         color: #40e0d0;
27       }
28       .string {
29         /* font-lock-string-face */
30         color: #00cd00;
31       }
32
33       a {
34         color: #FF0000;
35         background-color: inherit;
36         font: inherit;
37         font-weight: bold;
38         text-decoration: underline;
39       }
40       a:hover {
41         color: #FFFFFF;
42         background-color: #FD00FD;
43         text-decoration: underline;
44       }
45       .img a:hover {
46         background-color: #000000;
47         text-decoration: none;
48       }
49     -->
50     </style>
51   </head>
52   <body>
53     <pre>
54 <span class="comment">;; 08-sounds.el --- Sound set up
55 </span>
56 <span class="comment">;; Copyright (C) 2007 - 2020 Steve Youngs
57 </span>
58 <span class="comment">;;     Author: Steve Youngs &lt;<a href="mailto:steve&#64;sxemacs.org">steve&#64;sxemacs.org</a>&gt;
59 ;; Maintainer: Steve Youngs &lt;<a href="mailto:steve&#64;sxemacs.org">steve&#64;sxemacs.org</a>&gt;
60 ;;    Created: &lt;2007-12-02&gt;
61 ;; Time-stamp: &lt;Thursday Apr  9, 2020 07:39:34 steve&gt;
62 ;;   Download: &lt;<a href="https://downloads.sxemacs.org/SYinits">https://downloads.sxemacs.org/SYinits</a>&gt;
63 ;;   HTMLised: &lt;<a href="https://www.sxemacs.org/SYinits/08-sounds.html">https://www.sxemacs.org/SYinits/08-sounds.html</a>&gt;
64 ;;   Git Repo: git clone https://git.sxemacs.org/syinit
65 ;;   Keywords: init, compile
66 </span>
67 <span class="comment">;; This file is part of SYinit
68 </span>
69 <span class="comment">;; Redistribution and use in source and binary forms, with or without
70 ;; modification, are permitted provided that the following conditions
71 ;; are met:
72 ;;
73 ;; 1. Redistributions of source code must retain the above copyright
74 ;;    notice, this list of conditions and the following disclaimer.
75 ;;
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.
79 ;;
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.
83 ;;
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.
95 </span>
96 <span class="comment">;;; Commentary:
97 ;;
98 ;;   Just sets up sound stuff.
99 ;;
100 </span>
101 <span class="comment">;;; Credits:
102 ;;
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.
105 ;;
106 </span>
107 <span class="comment">;;; Todo:
108 ;;
109 ;;     
110 </span>
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))
138   )
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>"))
143 </pre>
144   <!--  SXEmacs Logo -->
145     <div class="img">
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" />
151       </a>
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!" />
159       </a>
160     </div>
161 <!--  End Valid XHTML 1.0 -->
162
163     <h6>Copyright &#169; 2020 Steve Youngs<br />
164      Verbatim copying and distribution is permitted in any medium,
165     providing this notice is preserved.<br />
166 <!-- hhmts start -->
167 Last modified: Wed Apr 15 18:13:26 AEST 2020
168 <!-- hhmts end -->
169    </h6>
170
171 </body>
172 </html>