File.Decoderval create :
(int -> string * int) ->
(int -> Unix.seek_command -> int) ->
(unit -> int) ->
tcreate read_func seek_func tell_func params opens a * stream like openfile for decoding but callbacks are used to * manipulate the data. read_func should return the requested amount of bytes * (or less if it is the end of file), seek_funk should return 0 if the seek * was ok or -1 if the stream is not seekable, tell_func should return the current * offset or -1 if there is no notion of offset in the stream. * Raises: Read_error, Not_vorbis, Version_mismatch, Bad_header, Internal_fault.
val openfile : string -> t * Unix.file_descrOpen a vorbis file for decoding.
val openfile_with_fd : Unix.file_descr -> tval decode_float : t -> float array array -> int -> int -> intdecode_float dec buff ofs len decodes len samples in each channel and puts * the result in buff starting at position ofs. *
val decode_float_alloc : t -> int -> float array arrayval decode_float_ba :
t ->
(float, Stdlib.Bigarray.float32_elt, Stdlib.Bigarray.c_layout)
Stdlib.Bigarray.Array1.t
array ->
int ->
int ->
intdecode_float_ba dec buff ofs len decodes len samples in each channel and puts * the result in buff starting at position ofs. *
val decode_float_alloc_ba :
t ->
int ->
(float, Stdlib.Bigarray.float32_elt, Stdlib.Bigarray.c_layout)
Stdlib.Bigarray.Array1.t
arrayval decode :
t ->
?big_endian:bool ->
?sample_size:int ->
?signed:bool ->
bytes ->
int ->
int ->
intSame as decode_float but decodes to integers.
val streams : t -> intGet the number of logical bitstreams within a physical bitstream.
Get the index of the sequential logical bitstream currently being decoded * (incremented at chaining boundaries even for non-seekable streams). For * seekable streams, it represents the actual chaining index within the * physical bitstream.
Get the vorbis comments from a vorbis file. The second argument is the * number of the logical bitstream (the current bitstream is used if it is set * to None).