Function: play-sound-file

play-sound-file is an interactive and byte-compiled function defined in simple.el.gz.

Signature

(play-sound-file FILE &optional VOLUME DEVICE)

Documentation

Play sound stored in FILE.

VOLUME and DEVICE correspond to the keywords of the sound specification for play-sound.

View in manual

Probably introduced at or before Emacs version 21.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun play-sound-file (file &optional volume device)
  "Play sound stored in FILE.
VOLUME and DEVICE correspond to the keywords of the sound
specification for `play-sound'."
  (interactive "fPlay sound file: ")
  (let ((sound (list :file file)))
    (if volume
	(plist-put sound :volume volume))
    (if device
	(plist-put sound :device device))
    (push 'sound sound)
    (play-sound sound)))