-(eval-when-compile (require 'cl))
-
-(defvar gnus-sound-inline-sound
- (and (fboundp 'device-sound-enabled-p)
- (device-sound-enabled-p))
- "When t, we will not spawn a subprocess to play sounds.")
-
-(defvar gnus-sound-directory (nnheader-find-etc-directory "sounds")
- "The directory containing the Sound Files.")
-
-(defvar gnus-sound-au-player "/usr/bin/showaudio"
- "Executable program for playing sun AU format sound files")
-(defvar gnus-sound-wav-player "/usr/local/bin/play"
- "Executable program for playing WAV files")
-
-
-;;; The following isn't implemented yet. Wait for Red Gnus.
-;(defvar gnus-sound-effects-enabled t
-; "When t, Gnus will use sound effects.")
-;(defvar gnus-sound-enable-hooks nil
-; "Functions run when enabling sound effects.")
-;(defvar gnus-sound-disable-hooks nil
-; "Functions run when disabling sound effects.")
-;(defvar gnus-sound-theme-song nil
-; "Theme song for Gnus.")
-;(defvar gnus-sound-enter-group nil
-; "Sound effect played when selecting a group.")
-;(defvar gnus-sound-exit-group nil
-; "Sound effect played when exiting a group.")
-;(defvar gnus-sound-score-group nil
-; "Sound effect played when scoring a group.")
-;(defvar gnus-sound-busy-sound nil
-; "Sound effect played when going into a ... sequence.")
+
+(defgroup gnus-audio nil
+ "Playing sound in Gnus."
+ :version "21.1"
+ :group 'gnus-visual
+ :group 'multimedia)
+
+(defvar gnus-audio-inline-sound
+ (or (if (fboundp 'device-sound-enabled-p)
+ (device-sound-enabled-p)) ; XEmacs
+ (fboundp 'play-sound)) ; Emacs 21
+ "Non-nil means try to play sounds without using an external program.")
+
+(defcustom gnus-audio-directory (nnheader-find-etc-directory "sounds")
+ "The directory containing the Sound Files."
+ :type '(choice directory (const nil))
+ :group 'gnus-audio)
+
+(defcustom gnus-audio-au-player "/usr/bin/showaudio"
+ "Executable program for playing sun AU format sound files."
+ :group 'gnus-audio
+ :type 'string)
+
+(defcustom gnus-audio-wav-player "/usr/local/bin/play"
+ "Executable program for playing WAV files."
+ :group 'gnus-audio
+ :type 'string)
+
+;;; The following isn't implemented yet. Wait for Millennium Gnus.
+;;(defvar gnus-audio-effects-enabled t
+;; "When t, Gnus will use sound effects.")
+;;(defvar gnus-audio-enable-hooks nil
+;; "Functions run when enabling sound effects.")
+;;(defvar gnus-audio-disable-hooks nil
+;; "Functions run when disabling sound effects.")
+;;(defvar gnus-audio-theme-song nil
+;; "Theme song for Gnus.")
+;;(defvar gnus-audio-enter-group nil
+;; "Sound effect played when selecting a group.")
+;;(defvar gnus-audio-exit-group nil
+;; "Sound effect played when exiting a group.")
+;;(defvar gnus-audio-score-group nil
+;; "Sound effect played when scoring a group.")
+;;(defvar gnus-audio-busy-sound nil
+;; "Sound effect played when going into a ... sequence.")