sig
exception False
exception Invalid_parameters
exception Invalid_channels
exception Invalid_argument
exception Could_not_open_file
exception Not_vorbis
exception Bad_header
exception Read_error
exception Not_audio
exception Internal_fault
exception Hole_in_data
exception Bad_link
exception Version_mismatch
exception Not_implemented
exception Unknown_error of int
exception Utf8_failure of string
val string_of_exc : exn -> string option
type bitstream = int
type info = {
vorbis_version : int;
audio_channels : int;
audio_samplerate : int;
bitrate_upper : int;
bitrate_nominal : int;
bitrate_lower : int;
bitrate_window : int;
}
val tags :
(string, string) Stdlib.Hashtbl.t -> unit -> (string * string) list
module Encoder :
sig
type t
val create : int -> int -> int -> int -> int -> Vorbis.Encoder.t
val create_vbr : int -> int -> float -> Vorbis.Encoder.t
val reset : Vorbis.Encoder.t -> unit
val headerout :
?encoder:string ->
Vorbis.Encoder.t ->
Ogg.Stream.stream -> (string * string) list -> unit
val headerout_packetout :
?encoder:string ->
Vorbis.Encoder.t ->
(string * string) list ->
Ogg.Stream.packet * Ogg.Stream.packet * Ogg.Stream.packet
val get_channels : Vorbis.Encoder.t -> int
val encode_buffer_float :
Vorbis.Encoder.t ->
Ogg.Stream.stream -> float array array -> int -> int -> unit
val time_of_granulepos :
Vorbis.Encoder.t -> Stdlib.Int64.t -> Stdlib.Nativeint.t
val end_of_stream : Vorbis.Encoder.t -> Ogg.Stream.stream -> unit
end
module Decoder :
sig
type t
val init :
Ogg.Stream.packet ->
Ogg.Stream.packet -> Ogg.Stream.packet -> Vorbis.Decoder.t
val info : Vorbis.Decoder.t -> Vorbis.info
val comments : Vorbis.Decoder.t -> string * (string * string) list
val check_packet : Ogg.Stream.packet -> bool
val decode_pcm :
Vorbis.Decoder.t ->
Ogg.Stream.stream -> float array array -> int -> int -> int
val restart : Vorbis.Decoder.t -> unit
end
module File :
sig
module Decoder :
sig
type t
val create :
(int -> string * int) ->
(int -> Unix.seek_command -> int) ->
(unit -> int) -> Vorbis.File.Decoder.t
val openfile : string -> Vorbis.File.Decoder.t * Unix.file_descr
val openfile_with_fd : Unix.file_descr -> Vorbis.File.Decoder.t
val decode_float :
Vorbis.File.Decoder.t -> float array array -> int -> int -> int
val decode_float_alloc :
Vorbis.File.Decoder.t -> int -> float array array
val decode :
Vorbis.File.Decoder.t ->
?big_endian:bool ->
?sample_size:int -> ?signed:bool -> string -> int -> int -> int
val streams : Vorbis.File.Decoder.t -> int
val bitstream : Vorbis.File.Decoder.t -> Vorbis.bitstream
val comments :
Vorbis.File.Decoder.t ->
Vorbis.bitstream -> string * (string * string) list
val info : Vorbis.File.Decoder.t -> Vorbis.bitstream -> Vorbis.info
val bitrate : Vorbis.File.Decoder.t -> Vorbis.bitstream -> int
val samples : Vorbis.File.Decoder.t -> Vorbis.bitstream -> int
val duration : Vorbis.File.Decoder.t -> Vorbis.bitstream -> float
val serialnumber : Vorbis.File.Decoder.t -> Vorbis.bitstream -> int
end
end
module Skeleton :
sig
val fisbone :
?start_granule:Stdlib.Int64.t ->
?headers:(string * string) list ->
serialno:Stdlib.Nativeint.t ->
samplerate:Stdlib.Int64.t -> unit -> Ogg.Stream.packet
end
end