]> gitweb.factorcode.org Git - factor.git/blob - extra/audio/vorbis/vorbis-docs.factor
379e8834f9860a86a6fd045b3a29c7dab4df67c5
[factor.git] / extra / audio / vorbis / vorbis-docs.factor
1 ! (c)2010 Joe Groff bsd license
2 USING: audio.engine destructors help.markup help.syntax
3 io.files kernel math strings ;
4 IN: audio.vorbis
5
6 HELP: <vorbis-stream>
7 { $values
8     { "stream" "a binary input stream" } { "buffer-size" integer }
9     { "vorbis-stream" vorbis-stream }
10 }
11 { $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" } "." } ;
12
13 HELP: no-vorbis-in-ogg
14 { $description { $link <vorbis-stream> } " throws this error when the Ogg stream it reads contains no Vorbis channel." } ;
15
16 HELP: ogg-error
17 { $values
18     { "code" integer }
19 }
20 { $description { $link <vorbis-stream> } " throws this error when the Ogg library raises an error while trying to parse the stream." } ;
21
22 HELP: read-vorbis-stream
23 { $values
24     { "filename" string } { "buffer-size" integer }
25     { "vorbis-stream" vorbis-stream }
26 }
27 { $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> } "." } ;
28
29 { read-vorbis-stream <vorbis-stream> } related-words
30
31 HELP: vorbis-error
32 { $values
33     { "code" integer }
34 }
35 { $description { $link <vorbis-stream> } " throws this error when the Vorbis library raises an error while trying to parse the stream." } ;
36
37 HELP: vorbis-stream
38 { $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." } ;
39
40 ARTICLE: "audio.vorbis" "Ogg Vorbis audio streaming"
41 "The " { $vocab-link "audio.vorbis" } " vocabulary provides Ogg Vorbis decoding and streaming for " { $vocab-link "audio.engine" } "."
42 { $subsections
43     vorbis-stream
44     read-vorbis-stream
45     <vorbis-stream>
46 } ;
47
48 ABOUT: "audio.vorbis"