summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2016-05-09 19:18:20 -0400
committerDavid Thompson <dthompson2@worcester.edu>2016-05-09 19:18:20 -0400
commitac31bdf8772c6b67a7721c760ce02c60126c6f98 (patch)
treec293ba8660e14e15ef441261b4b0c8600cca4bf4
parentdb574e3585622ea17b187f27eac5c4e030953e36 (diff)
audio: Ignore errors when playing samples.
* sly/audio.scm (play-sample): Ignore exceptions.
-rw-r--r--sly/audio.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/sly/audio.scm b/sly/audio.scm
index bac3ab0..3e1164a 100644
--- a/sly/audio.scm
+++ b/sly/audio.scm
@@ -77,7 +77,9 @@ value between 0 and 128."
(define (play-sample sample)
"Play the given audio SAMPLE."
- (ignore-value (sdl2:play-chunk! (sample-audio sample))))
+ (ignore-value
+ (false-if-exception
+ (sdl2:play-chunk! (sample-audio sample)))))
;; Wrapper over SDL music objects.
(define-record-type <music>