add flac seek
parent
2a0c71fd6e
commit
1829f4e732
|
@ -31,6 +31,10 @@ M: flac-stream-reader dispose stream>> dispose ;
|
||||||
dup bytes>> swap [ prepend ] dip swap >>bytes drop
|
dup bytes>> swap [ prepend ] dip swap >>bytes drop
|
||||||
] while flac-input-stream get bitstream>> bitstreams:read ;
|
] while flac-input-stream get bitstream>> bitstreams:read ;
|
||||||
|
|
||||||
|
: flac-seek ( n -- )
|
||||||
|
[ 8 * flac-input-stream get bitstream>> bitstreams:seek ]
|
||||||
|
[ io:seek-relative flac-input-stream get stream>> io:stream-seek ] bi ;
|
||||||
|
|
||||||
: flac-read-sint ( n -- n )
|
: flac-read-sint ( n -- n )
|
||||||
! TODO: this isn't rightt
|
! TODO: this isn't rightt
|
||||||
dup flac-read-uint dup . dup 1 - neg shift swap shift ;
|
dup flac-read-uint dup . dup 1 - neg shift swap shift ;
|
||||||
|
|
Loading…
Reference in New Issue