     { block vorbis-block }
     { comment vorbis-comment }
     { temp-state ogg-stream-state }
-    { #vorbis-headers integer initial: 0 } ;
+    { #vorbis-headers integer initial: 0 }
+    { stream-eof? boolean } ;
 
 CONSTANT: stream-buffer-size 4096
 

M: vorbis-stream generator-audio-format
    [ info>> channels>> ] [ drop 16 ] [ info>> rate>> ] tri ;
M: vorbis-stream generate-audio
    drop f f ;


: retrieve-page ( vorbis-stream -- ? )
    [ sync-state>> ] [ page>> ] bi ogg_sync_pageout 0 > ; inline

: sync-pages ( vorbis-stream -- )
    dup retrieve-page [ [ queue-page ] [ sync-pages ] bi ] [ drop ] if ;

: standard-initial-header? ( vorbis-stream -- bool )
    page>> ogg_page_bos zero? not ; inline
