summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/audio.scm9
1 files changed, 5 insertions, 4 deletions
diff --git a/chickadee/audio.scm b/chickadee/audio.scm
index 61d033b..86b52b2 100644
--- a/chickadee/audio.scm
+++ b/chickadee/audio.scm
@@ -377,7 +377,9 @@ data."
(unless (source-playing? source)
(openal:source-play (source-openal-source source))
(when (streaming-source? source)
- (add-streaming-source (current-sound-system) source))))
+ (add-streaming-source (current-sound-system) source))
+ (openal:set-source-looping! (source-openal-source source)
+ (and (static-source? source) (source-loop? source)))))
(define (source-pause source)
"Pause playback of SOURCE."
@@ -423,8 +425,7 @@ sources."
(define (set-source-loop! source loop?)
"Configure whether or not SOURCE should loop the audio stream."
- (%set-source-pitch! source loop?)
- (openal:set-source-looping! (source-openal-source source) loop?))
+ (%set-source-loop! source loop?))
(define (set-source-pitch! source pitch)
"Set the pitch multiplier for SOURCE to PITCH."
@@ -544,7 +545,7 @@ listener. Otherwise, the position is in absolute coordinates."
(openal:set-buffer-data! buffer chunk length format sample-rate)
(openal:source-queue-buffer (source-openal-source source) buffer)
(when (source-stopped? source)
- (source-play source))
+ (openal:source-play (source-openal-source source)))
#t))
((source-loop? source)
;; Reset back to the beginning and try again.