From ac31bdf8772c6b67a7721c760ce02c60126c6f98 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 9 May 2016 19:18:20 -0400 Subject: audio: Ignore errors when playing samples. * sly/audio.scm (play-sample): Ignore exceptions. --- sly/audio.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3