]> gitweb @ CieloNegro.org - soundpipes.git/blobdiff - docs/components.rst
We probably don't need wvdec's reactive stream info.
[soundpipes.git] / docs / components.rst
index 5770f63bf6101453f654a27df5d910c02323a4f9..627b69dbb81b3ca0f2f15156551ffe322e616e55 100644 (file)
@@ -1,6 +1,8 @@
 Component diagrams
 ==================
 
+.. contents::
+
 -------
 filesrc
 -------
@@ -15,12 +17,16 @@ Diagram::
             |         |
             `---------'
 
+Input
+~~~~~
 control event
     * Open FilePath
     * Seek SeekMode Integer
     * Read Int
     * Close
 
+Output
+~~~~~~
 octet stream event
     ByteString (response for the "Read" event)
 
@@ -28,34 +34,37 @@ reactive state value
     * Open Integer Integer -- size and the current position
     * Closed
 
------
-wvdec
------
+
+-------
+wvparse
+-------
 
 Diagram::
 
-    decoder ctrl ,-------. wv ctrl
-    ------------>|       |----------->
-    wv stream    |       | wvc ctrl
-    ------------>| wvdec |----------->
-    wvc stream   |       | PCM streams
-    ------------>|       |----------->
-                 `-------' state
-                      | `------------>
-                      | stream info
-                      `-------------->
-
-decoder control event
-    FileDecodingCtrl -- Seekable wv/wvc ctrl
-        * Reset (can be omitted)
-        * Start
-        * Stop
-        * Seek Integer -- sample index
-
-    StreamDecodingCtrl -- NonSeekable wv/wvc ctrl
-        * Reset (can be omitted)
-        * Start
-        * Stop
+    parser ctl
+    -----------.
+                v
+    wv stream  ,---------. wv ctrl
+    ---------->|         |------------->
+    wvc stream |         | wvc ctrl
+    ---------->| wvparse |------------->
+               |         | wv/wvc blocks
+               |         |------------->
+               `---------' media tags
+                      | `-------------->
+                      | parser state
+                      `---------------->
+
+Input
+~~~~~
+parser control event
+    SeekableParserCtrl
+        * GetNext
+        * FindTags
+        * Seek Integer -- frame index
+
+    NonSeekableParserCtrl
+        * GetNext
 
 wv stream event
     ByteString
@@ -63,30 +72,56 @@ wv stream event
 wvc stream event
     Maybe ByteString
 
-wv/wvc control event
+Output
+~~~~~~
+wv/wvc stream control event
     Seekable
         * Seek SeekMode Integer
         * Read Int
-        * Close
 
     NonSeekable
         * Read Int
 
-PCM stream events
+wv/wvc blocks event
+    #. [WavPack.Block] -- wv blocks for all channels (non-empty)
+    #. [WavPack.Block] -- wvc blocks for all channels
+    #. Integer         -- samples to skip
+
+reactive media tags
+    Map Text Text
+
+reactive parser state value
+    * Inactive
+    * Active (Maybe Integer) -- # samples
+
+
+-----
+wvdec
+-----
+
+Diagram::
+
+                  ,-------.
+    wv/wvc blocks |       | PCM streams
+    ------------->| wvdec |----------->
+                  |       |
+                  `-------'
+
+Input
+~~~~~
+wv/wvc blocks event
+    #. [WavPack.Block] -- wv blocks for all channels (non-empty)
+    #. [WavPack.Block] -- wvc blocks for all channels
+    #. Integer         -- frames to skip
+
+Output
+~~~~~~
+reactive PCM streams
     (FIXME: not defined yet)
 
-reactive state value
-    * Idle
-    * Running
-
-reactive stream info (Maybe; responds to the "Reset" event)
-    #. compression style :: Lossless | Hybrid Bool Bool -- True if
-       using wvc, True if dynamic noise shaping is in effect
-    #. compression mode :: Fast | Normal | High | VeryHigh
-    #. extra compression level :: Maybe Int
-    #. sample format :: Word8 | Word16 | Word32 | Float
-    #. # channels :: Int
-    #. channel mask :: (FIXME: not defined yet)
-    #. sampling rate :: Integer
-    #. # samples :: Maybe Integer
-    #. media tags :: (FIXME: not defined yet)
+
+------
+wvplay
+------
+
+FIXME: under construction