Function: erc-play-sound

erc-play-sound is a byte-compiled function defined in erc-sound.el.gz.

Signature

(erc-play-sound FILE)

Documentation

Play a sound file located in one of the directories in erc-sound-path.

See also play-sound-file.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-sound.el.gz
(defun erc-play-sound (file)
  "Play a sound file located in one of the directories in `erc-sound-path'.
See also `play-sound-file'."
  (let ((filepath (erc-find-file file erc-sound-path)))
    (if (and (not filepath) erc-default-sound)
	(setq filepath erc-default-sound))
    (cond ((and filepath (file-exists-p filepath))
	   (play-sound-file filepath))
	  (t (beep)))
    (erc-log (format "Playing sound file %S" filepath))))