diff options
author | David Thompson <dthompson2@worcester.edu> | 2016-05-09 19:18:20 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2016-05-09 19:18:20 -0400 |
commit | ac31bdf8772c6b67a7721c760ce02c60126c6f98 (patch) | |
tree | c293ba8660e14e15ef441261b4b0c8600cca4bf4 | |
parent | db574e3585622ea17b187f27eac5c4e030953e36 (diff) |
audio: Ignore errors when playing samples.
* sly/audio.scm (play-sample): Ignore exceptions.
-rw-r--r-- | sly/audio.scm | 4 |
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> |