;; 08-sounds.el --- Sound set up

;; Copyright (C) 2007 - 2020 Steve Youngs

;;     Author: Steve Youngs <steve@sxemacs.org>
;; Maintainer: Steve Youngs <steve@sxemacs.org>
;;    Created: <2007-12-02>
;; Time-stamp: <Thursday Apr  9, 2020 07:39:34 steve>
;;   Download: <https://downloads.sxemacs.org/SYinits>
;;   HTMLised: <https://www.sxemacs.org/SYinits/08-sounds.html>
;;   Git Repo: git clone https://git.sxemacs.org/syinit
;;   Keywords: init, compile

;; This file is part of SYinit

;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
;; 1. Redistributions of source code must retain the above copyright
;;    notice, this list of conditions and the following disclaimer.
;;
;; 2. Redistributions in binary form must reproduce the above copyright
;;    notice, this list of conditions and the following disclaimer in the
;;    documentation and/or other materials provided with the distribution.
;;
;; 3. Neither the name of the author nor the names of any contributors
;;    may be used to endorse or promote products derived from this
;;    software without specific prior written permission.
;;
;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

;;; Commentary:
;;
;;   Just sets up sound stuff.
;;

;;; Credits:
;;
;;   The HTML version of this file was created with Hrvoje Niksic's
;;   htmlize.el which is part of the XEmacs "text-modes" package.
;;

;;; Todo:
;;
;;     

;;; Code:
;:*=======================
;:* Set default sound device
(when (getenv "DISPLAY")                ; skip the lot if not in X11
  (setq default-audio-device (make-audio-device 'pulse))
  ;(setq default-audio-device (make-audio-device 'alsa))
  (init-workers 6)
  (setq synchronous-sounds nil)
  (load "sound")
  (setq bell-volume 100)
  (when (device-sound-enabled-p)
    (load-sound-file "low-smash" 'auto-save-error)
    (load-sound-file "bark" 'command-error)
    (load-sound-file "slap" 'undefined-key)
    (load-sound-file "slap" 'undefined-click)
    (load-sound-file "clink" 'no-completion)
    (load-sound-file "bong" 'y-or-n-p)
    (load-sound-file "explosion" 'yes-or-no-p)
    (load-sound-file "drip" 'buffer-bound)
    (load-sound-file "whip" 'read-only)
    (load-sound-file "bass-snap" 'default)
    (load-sound-file "yeep" 'quit)
    (load-sound-file "drum-beep" 'isearch-failed)
    (load-sound-file "bass-snap" 'isearch-quit)
    (load-sound-file "slap" 'ready)
    (load-sound-file "return" 'warp)
    (load-sound-file "cuckoo" 'alarm))
  )
;:*::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
(if default-audio-device
    (message "sounds loaded")
  (message "sounds NOT loaded (OK if this is a TTY)"))
Created with SXEmacs Valid XHTML 1.0 Transitional!
Copyright © 2020 Steve Youngs
Verbatim copying and distribution is permitted in any medium, providing this notice is preserved.
Last modified: Wed Apr 15 18:13:26 AEST 2020