Vorbis.Decoder
val init : Ogg.Stream.packet -> Ogg.Stream.packet -> Ogg.Stream.packet -> t
Initialize decoder. Needs the first 3 packets of the ogg logical * stream. Use check_packet
to check against the first one.
val comments : t -> string * (string * string) list
Get vorbis comments from the decoder
val check_packet : Ogg.Stream.packet -> bool
Check wether a ogg packet contains vorbis data. * Usefull for parsing ogg containers with multiple streams.
val decode_pcm :
t ->
Ogg.Stream.stream ->
float array array ->
int ->
int ->
int
decode_pcm dec stream buffer pos offset
decodes pcm float data * from stream
. The floats are written in buffer
, starting at * position pos
. The function returns the number of samples actually written.
val decode_pcm_ba :
t ->
Ogg.Stream.stream ->
(float, Stdlib.Bigarray.float32_elt, Stdlib.Bigarray.c_layout)
Stdlib.Bigarray.Array1.t
array ->
int ->
int ->
int
decode_pcm_ba dec stream buffer pos offset
decodes pcm float data * from stream
. The floats are written in buffer
, starting at * position pos
. The function returns the number of samples actually written.
val restart : t -> unit
Restart the decoder