]> gitweb.factorcode.org Git - factor.git/commitdiff
audio.loader docs
authorJoe Groff <arcata@gmail.com>
Tue, 26 Jan 2010 04:12:22 +0000 (20:12 -0800)
committerJoe Groff <arcata@gmail.com>
Tue, 26 Jan 2010 04:12:22 +0000 (20:12 -0800)
extra/audio/engine/authors.txt [new file with mode: 0644]
extra/audio/engine/summary.txt [new file with mode: 0644]
extra/audio/loader/authors.txt [new file with mode: 0644]
extra/audio/loader/loader-docs.factor [new file with mode: 0644]
extra/audio/loader/summary.txt [new file with mode: 0644]

diff --git a/extra/audio/engine/authors.txt b/extra/audio/engine/authors.txt
new file mode 100644 (file)
index 0000000..f13c9c1
--- /dev/null
@@ -0,0 +1 @@
+Joe Groff
diff --git a/extra/audio/engine/summary.txt b/extra/audio/engine/summary.txt
new file mode 100644 (file)
index 0000000..580c51e
--- /dev/null
@@ -0,0 +1 @@
+Audio playback engine
diff --git a/extra/audio/loader/authors.txt b/extra/audio/loader/authors.txt
new file mode 100644 (file)
index 0000000..f13c9c1
--- /dev/null
@@ -0,0 +1 @@
+Joe Groff
diff --git a/extra/audio/loader/loader-docs.factor b/extra/audio/loader/loader-docs.factor
new file mode 100644 (file)
index 0000000..2544436
--- /dev/null
@@ -0,0 +1,36 @@
+! (c)2010 Joe Groff bsd license
+USING: audio help.markup help.syntax kernel quotations strings ;
+IN: audio.loader
+
+HELP: read-audio
+{ $values
+    { "path" "a pathname string" }
+    { "audio" audio }
+}
+{ $description "Reads the audio data from the file on disk named " { $snippet "path" } ", saving the data in an " { $link audio } " object. If the file's extension is not recognized, an " { $link unknown-audio-extension } " error is thrown." } ;
+
+HELP: register-audio-extension
+{ $values
+    { "extension" string } { "quot" quotation }
+}
+{ $description "Registers a quotation for " { $link read-audio } " to use when reading audio files with filenames ending in " { $snippet ".extension" } ". The quotation should have the effect " { $snippet "( path -- audio )" } ", where " { $snippet "path" } " is the file's pathname and " { $snippet "audio" } " is the resulting " { $link audio } " object." } ;
+
+HELP: unknown-audio-extension
+{ $values
+    { "extension" string }
+}
+{ $description "Errors of this class are thrown by " { $link read-audio } " when it cannot recognize the extension of the file it is given to open." } ;
+
+ARTICLE: "audio.loader" "Audio file loader"
+"The " { $vocab-link "audio.loader" } " vocabulary provides words for reading uncompressed PCM data from files on disk."
+{ $subsections
+    read-audio
+}
+"Other vocabularies can extend " { $link read-audio } " by adding support for other audio file formats."
+{ $subsections
+    register-audio-extension
+    unknown-audio-extension
+}
+"By default, " { $snippet "audio.loader" } " supports WAV (with the file extension " { $snippet ".wav" } ") and AIFF (with extension " { $snippet ".aif" } " or " { $snippet ".aiff" } ")." ;
+
+ABOUT: "audio.loader"
diff --git a/extra/audio/loader/summary.txt b/extra/audio/loader/summary.txt
new file mode 100644 (file)
index 0000000..c9cba34
--- /dev/null
@@ -0,0 +1 @@
+Read PCM audio data from uncompressed audio files