summaryrefslogtreecommitdiff
path: root/doc/api.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api.texi')
-rw-r--r--doc/api.texi61
1 files changed, 60 insertions, 1 deletions
diff --git a/doc/api.texi b/doc/api.texi
index 554b531..d72980a 100644
--- a/doc/api.texi
+++ b/doc/api.texi
@@ -732,4 +732,63 @@ considered an advanced feature.
@node Audio
@section Audio
-There is no audio support yet. Stay tuned!
+Chickadee has two data types for audio: samples and music. Samples
+are for short sound effects like explosions. Music is for, well,
+uh@dots{}, music.
+
+Supported file formats include WAV and OGG.
+
+@deffn {Scheme Procedure} load-sample @var{file}
+Load audio sample from @var{file}.
+@end deffn
+
+@deffn {Scheme Procedure} set-sample-volume! @var{volume}
+Set the volume that all samples are played at to @var{volume}, an
+integer value between 0 and 128.
+@end deffn
+
+@deffn {Scheme Procedure} play-sample @var{sample}
+Play @var{sample}. Pretty straightforward!
+@end deffn
+
+@deffn {Scheme Procedure} load-music @var{file}
+Load music from @var{file}.
+@end deffn
+
+@deffn {Scheme Procedure} music-volume
+Return the volume level for music, an integer value between 0 and 128.
+@end deffn
+
+@deffn {Scheme Procedure} set-music-volume! @var{volume}
+Set the volume that music is played at to @var{volume}, an integer
+value between 0 and 128.
+@end deffn
+
+@deffn {Scheme Procedure} play-music @var{music} [@var{loop?}]
+Play @var{music}. If @var{loop?}, play it over and over and over and
+over and@dots{}
+@end deffn
+
+@deffn {Scheme Procedure} pause-music
+Pause the current music track.
+@end deffn
+
+@deffn {Scheme Procedure} resume-music
+Resume the current music track.
+@end deffn
+
+@deffn {Scheme Procedure} rewind-music
+estart the current music track from the beginning.
+@end deffn
+
+@deffn {Scheme Procedure} stop-music
+Stop playing the current music track.
+@end deffn
+
+@deffn {Scheme Procedure} music-playing?
+Return @code{#t} if music is currently playing.
+@end deffn
+
+@deffn {Scheme Procedure} music-paused?
+Return @code{#t} if music is currently paused.
+@end deffn