 M: vorbis-stream generator-audio-format
     [ info>> channels>> ] [ drop 16 ] [ info>> rate>> ] tri ;
 M: vorbis-stream generate-audio
-    dup decode-audio
-    [ [ drop ] 2dip ]
-    [ drop [ buffer-data-from-stream drop ] [ sync-pages ] [ decode-audio ] tri ] if* ;
+    [ buffer>> ] [ 0 decode-audio ] bi ;


TUPLE: vorbis-stream < disposable
    stream
    { packet ogg-packet }
    { sync-state ogg-sync-state }
    { page ogg-page }

    { block vorbis-block }
    { comment vorbis-comment }
    { temp-state ogg-stream-state }
    { #vorbis-headers integer initial: 0 } ;

CONSTANT: stream-buffer-size 4096

