From e7d470e954d0a17ab1b2fe0065f46f78475272f9 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 8 Apr 2020 17:10:29 -0400 Subject: Add chickade 0.5.0 stuff. --- manuals/chickadee/Audio.html | 129 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 manuals/chickadee/Audio.html (limited to 'manuals/chickadee/Audio.html') diff --git a/manuals/chickadee/Audio.html b/manuals/chickadee/Audio.html new file mode 100644 index 0000000..5540e83 --- /dev/null +++ b/manuals/chickadee/Audio.html @@ -0,0 +1,129 @@ + + + + + + +Audio (The Chickadee Game Toolkit) + + + + + + + + + + + + + + + + + + + +
+

+Next: , Previous: , Up: API Reference   [Contents][Index]

+
+
+

2.4 Audio

+ +

A game isn’t complete without sound. Most games play some cool +background music to set the mood and have many sound effects to play +when events happen. The (chickadee audio) module provides a +robust audio API backed by the OpenAL 3D audio system. +

+ + + + + + + +

The basics of playing audio are very simple. Just load an audio file +in the load hook (or anywhere else once the game loop is running) and +play it! +

+
+
(use-modules (chickadee audio))
+
+(define audio #f)
+
+(define (load)
+  (set! audio (load-audio "neat-sound-effect.wav"))
+  (audio-play audio))
+
+(run-game #:load load)
+
+ +

For more advanced usage, check out the full API reference in the +following sections. +

+ + + + + -- cgit v1.2.3