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

diff --git a/extra/audio/vorbis/authors.txt b/extra/audio/vorbis/authors.txt
new file mode 100644 (file)
index 0000000..338647c
--- /dev/null
@@ -0,0 +1,2 @@
+Chris Double
+Joe Groff
diff --git a/extra/audio/vorbis/summary.txt b/extra/audio/vorbis/summary.txt
new file mode 100644 (file)
index 0000000..9ca8504
--- /dev/null
@@ -0,0 +1 @@
+Ogg Vorbis audio streaming for audio.engine
diff --git a/extra/audio/vorbis/vorbis-docs.factor b/extra/audio/vorbis/vorbis-docs.factor
new file mode 100644 (file)
index 0000000..379e883
--- /dev/null
@@ -0,0 +1,48 @@
+! (c)2010 Joe Groff bsd license
+USING: audio.engine destructors help.markup help.syntax
+io.files kernel math strings ;
+IN: audio.vorbis
+
+HELP: <vorbis-stream>
+{ $values
+    { "stream" "a binary input stream" } { "buffer-size" integer }
+    { "vorbis-stream" vorbis-stream }
+}
+{ $description "Constructs " { $link vorbis-stream } " over the contents of " { $snippet "stream" } ". When used as an audio generator, the Vorbis stream will supply data to the audio engine in " { $snippet "buffer-size" } " byte blocks. If the Vorbis stream is created successfully, it will take ownership of " { $snippet "stream" } ", disposing it when " { $link dispose } " is called on the " { $snippet "vorbis-stream" } "." } ;
+
+HELP: no-vorbis-in-ogg
+{ $description { $link <vorbis-stream> } " throws this error when the Ogg stream it reads contains no Vorbis channel." } ;
+
+HELP: ogg-error
+{ $values
+    { "code" integer }
+}
+{ $description { $link <vorbis-stream> } " throws this error when the Ogg library raises an error while trying to parse the stream." } ;
+
+HELP: read-vorbis-stream
+{ $values
+    { "filename" string } { "buffer-size" integer }
+    { "vorbis-stream" vorbis-stream }
+}
+{ $description "Opens a binary " { $link <file-reader> } " for the file named " { $snippet "filename" } ", and construct a " { $link vorbis-stream } " over the file contents using " { $link <vorbis-stream> } "." } ;
+
+{ read-vorbis-stream <vorbis-stream> } related-words
+
+HELP: vorbis-error
+{ $values
+    { "code" integer }
+}
+{ $description { $link <vorbis-stream> } " throws this error when the Vorbis library raises an error while trying to parse the stream." } ;
+
+HELP: vorbis-stream
+{ $class-description "Objects of this class maintain the stream and decoder state for the Ogg Vorbis decoder. " { $snippet "vorbis-stream" } " implements the " { $link "audio.engine-generators" } ", so it can be used as the generator for a " { $link streaming-audio-clip } ". Use " { $link <vorbis-stream> } " or " { $link read-vorbis-stream } " to construct a Vorbis stream." } ;
+
+ARTICLE: "audio.vorbis" "Ogg Vorbis audio streaming"
+"The " { $vocab-link "audio.vorbis" } " vocabulary provides Ogg Vorbis decoding and streaming for " { $vocab-link "audio.engine" } "."
+{ $subsections
+    vorbis-stream
+    read-vorbis-stream
+    <vorbis-stream>
+} ;
+
+ABOUT: "audio.vorbis"