emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/slime-volleyball 42ff46e 12/27: Ignore EMMS errors


From: Thomas Fitzsimmons
Subject: [elpa] externals/slime-volleyball 42ff46e 12/27: Ignore EMMS errors
Date: Sun, 22 Nov 2020 18:05:17 -0500 (EST)

branch: externals/slime-volleyball
commit 42ff46e3a15d312698104b991f159f751ad585e5
Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Commit: Thomas Fitzsimmons <fitzsim@fitzsim.org>

    Ignore EMMS errors
---
 slime-volleyball.el | 36 +++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/slime-volleyball.el b/slime-volleyball.el
index c8c23b2..3c8ce51 100644
--- a/slime-volleyball.el
+++ b/slime-volleyball.el
@@ -1682,23 +1682,25 @@
       (cancel-timer timer))))
 
 (defun slime-volleyball-play-music (name)
-  (when slime-volleyball-enable-sound
-    (let ((temp-file (make-temp-file name nil ".ogg"))
-          ;; This is not recommended.
-          (large-file-warning-threshold 1000000000)
-          (undo-outer-limit 60000000))
-      (find-file (expand-file-name (concat name ".b64")
-                                   (file-name-directory
-                                    (symbol-file 'slime-volleyball-init))))
-      (with-current-buffer (concat name ".b64")
-        (base64-decode-region (point-min) (point-max))
-        (write-file temp-file)
-        ;; Clear mini-buffer.
-        (message nil)
-        (kill-buffer))
-      ;; Suppress message "EMMS: All track information loaded.".
-      (let ((emms-info-asynchronously nil))
-        (emms-play-file temp-file)))))
+  ;; Ignore errors in case EMMS doesn't have ogg support.
+  (ignore-errors
+    (when slime-volleyball-enable-sound
+      (let ((temp-file (make-temp-file name nil ".ogg"))
+            ;; This is not recommended.
+            (large-file-warning-threshold 1000000000)
+            (undo-outer-limit 60000000))
+        (find-file (expand-file-name (concat name ".b64")
+                                     (file-name-directory
+                                      (symbol-file 'slime-volleyball-init))))
+        (with-current-buffer (concat name ".b64")
+          (base64-decode-region (point-min) (point-max))
+          (write-file temp-file)
+          ;; Clear mini-buffer.
+          (message nil)
+          (kill-buffer))
+        ;; Suppress message "EMMS: All track information loaded.".
+        (let ((emms-info-asynchronously nil))
+          (emms-play-file temp-file))))))
 
 (defun slime-volleyball-introduce-opponent ()
   (when (and (not slime-volleyball-two-players)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]