summaryrefslogtreecommitdiff
path: root/manuals/chickadee/Audio.html
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2018-03-10 20:32:18 -0500
committerDavid Thompson <dthompson2@worcester.edu>2018-03-10 20:32:32 -0500
commitaf2872325ed461252303ec8b7987058b664843f1 (patch)
treecb710d0a186a2617ab86b98a5bdb9acd4cbe6934 /manuals/chickadee/Audio.html
parent89a3558fb9b094b9a92055e98ad655e9bb799eba (diff)
Update Chickadee manual.
Diffstat (limited to 'manuals/chickadee/Audio.html')
-rw-r--r--manuals/chickadee/Audio.html97
1 files changed, 96 insertions, 1 deletions
diff --git a/manuals/chickadee/Audio.html b/manuals/chickadee/Audio.html
index 2f20199..755efb9 100644
--- a/manuals/chickadee/Audio.html
+++ b/manuals/chickadee/Audio.html
@@ -57,8 +57,31 @@ span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
+@media (min-width: 1140px) {
+ body {
+ margin-left: 14rem;
+ margin-right: 4rem;
+ max-width: 52rem;
+ }
+}
+
+@media (min-width: 800px) and (max-width: 1140px) {
+ body {
+ margin-left: 6rem;
+ margin-right: 4rem;
+ max-width: 52rem;
+ }
+}
+
+@media (max-width: 800px) {
+ body {
+ margin: 1rem;
+ }
+}
+
-->
</style>
+<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css">
</head>
@@ -73,8 +96,80 @@ Previous: <a href="Graphics.html#Graphics" accesskey="p" rel="prev">Graphics</a>
<a name="Audio-1"></a>
<h3 class="section">2.5 Audio</h3>
-<p>There is no audio support yet. Stay tuned!
+<p>Chickadee has two data types for audio: samples and music. Samples
+are for short sound effects like explosions. Music is for, well,
+uh&hellip;, music.
</p>
+<p>Supported file formats include WAV and OGG.
+</p>
+<dl>
+<dt><a name="index-load_002dsample"></a>Scheme Procedure: <strong>load-sample</strong> <em><var>file</var></em></dt>
+<dd><p>Load audio sample from <var>file</var>.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-set_002dsample_002dvolume_0021"></a>Scheme Procedure: <strong>set-sample-volume!</strong> <em><var>volume</var></em></dt>
+<dd><p>Set the volume that all samples are played at to <var>volume</var>, an
+integer value between 0 and 128.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-play_002dsample"></a>Scheme Procedure: <strong>play-sample</strong> <em><var>sample</var></em></dt>
+<dd><p>Play <var>sample</var>. Pretty straightforward!
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-load_002dmusic"></a>Scheme Procedure: <strong>load-music</strong> <em><var>file</var></em></dt>
+<dd><p>Load music from <var>file</var>.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-music_002dvolume"></a>Scheme Procedure: <strong>music-volume</strong></dt>
+<dd><p>Return the volume level for music, an integer value between 0 and 128.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-set_002dmusic_002dvolume_0021"></a>Scheme Procedure: <strong>set-music-volume!</strong> <em><var>volume</var></em></dt>
+<dd><p>Set the volume that music is played at to <var>volume</var>, an integer
+value between 0 and 128.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-play_002dmusic"></a>Scheme Procedure: <strong>play-music</strong> <em><var>music</var> [<var>loop?</var>]</em></dt>
+<dd><p>Play <var>music</var>. If <var>loop?</var>, play it over and over and over and
+over and&hellip;
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-pause_002dmusic"></a>Scheme Procedure: <strong>pause-music</strong></dt>
+<dd><p>Pause the current music track.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-resume_002dmusic"></a>Scheme Procedure: <strong>resume-music</strong></dt>
+<dd><p>Resume the current music track.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-rewind_002dmusic"></a>Scheme Procedure: <strong>rewind-music</strong></dt>
+<dd><p>estart the current music track from the beginning.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-stop_002dmusic"></a>Scheme Procedure: <strong>stop-music</strong></dt>
+<dd><p>Stop playing the current music track.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-music_002dplaying_003f"></a>Scheme Procedure: <strong>music-playing?</strong></dt>
+<dd><p>Return <code>#t</code> if music is currently playing.
+</p></dd></dl>
+
+<dl>
+<dt><a name="index-music_002dpaused_003f"></a>Scheme Procedure: <strong>music-paused?</strong></dt>
+<dd><p>Return <code>#t</code> if music is currently paused.
+</p></dd></dl>
+