From: fliep Date: Fri, 30 Apr 2010 01:44:59 +0000 (+0000) Subject: Forgot to add glk-sound-resources.sgml X-Git-Tag: v0.9~217 X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=827112834bc916f114fb3aa10b5bb405e0575d03;p=projects%2Fchimara%2Fchimara.git Forgot to add glk-sound-resources.sgml --- diff --git a/docs/reference/glk-sound-resources.sgml b/docs/reference/glk-sound-resources.sgml new file mode 100644 index 0000000..aaf4fd4 --- /dev/null +++ b/docs/reference/glk-sound-resources.sgml @@ -0,0 +1,35 @@ + + + + +Sound Resources +3 +CHIMARA Library + + +Sound Resources +Sound in Glk + + +Description + +As with graphics, so with sound. Sounds, however, obviously don't appear in windows. To play a sound in Glk, you must first create a sound channel to hold it. This is an entirely new class of opaque objects; there are create and destroy and iterate and get_rock functions for channels, just as there are for windows and streams and filerefs. + +A channel can be playing exactly one sound at a time. If you want to play more than one sound simultaneously, you need more than one sound channel. On the other hand, a single sound can be played on several channels at the same time, or overlapping itself. + +Sound is an optional capability in Glk. + +As with images, sounds are kept in resources, and your program does not have to worry about the formatting or storage. A resource is referred to by an integer identifier. + +A resource can theoretically contain any kind of sound data, of any length. A resource can even be infinitely long. +This would be represented by some sound encoding with a built-in repeat-forever flag — but that is among the details which are hidden from you. + +A resource can also contain two or more channels of sound (stereo data). Do not confuse such in-sound channels with Glk sound channels. A single Glk sound channel suffices to play any sound, even stereo sounds. + + +Again, Blorb is the official resource-storage format of Glk. Sounds in Blorb files can be encoded as AIFF, MOD, or MOD song data. See the Blorb specification for details. + + + \ No newline at end of file