diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-01-22 20:08:38 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-01-22 20:08:38 -0500 |
commit | 87bdccb3b3b4f7cd3c63b0cea5ab4e73b31ac863 (patch) | |
tree | a60f1dccccd2d7266c02d2eb5d9096f34b79d12f /2d | |
parent | 7c540f61a710847fd59033d3d2ee1dfc6364b928 (diff) |
Initialize audio in audio module instead of window module.
* 2d/window.scm (open-window, close-window): Remove open/close audio
calls.
* 2d/audio.scm: Open audio when module is imported.
Diffstat (limited to '2d')
-rw-r--r-- | 2d/audio.scm | 2 | ||||
-rw-r--r-- | 2d/window.scm | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/2d/audio.scm b/2d/audio.scm index 2978a22..15eaaa5 100644 --- a/2d/audio.scm +++ b/2d/audio.scm @@ -26,6 +26,8 @@ #:use-module (srfi srfi-2) #:use-module ((sdl mixer) #:prefix SDL:)) +(SDL:open-audio) + ;; Wrapper over SDL audio objects. (define-record-type <sample> (make-sample audio) diff --git a/2d/window.scm b/2d/window.scm index 1d82a97..c62c7b6 100644 --- a/2d/window.scm +++ b/2d/window.scm @@ -73,7 +73,6 @@ ;; Initialize everything (SDL:enable-unicode #t) (SDL:init 'everything) - (SDL:open-audio) ;; Open SDL window in OpenGL mode. (SDL:set-video-mode width height 24 flags) (SDL:set-caption (window-title window)) @@ -92,7 +91,6 @@ (define (close-window) "Close the currently open window and audio." - (SDL:close-audio) (SDL:quit)) (define-syntax-rule (with-window window body ...) |