sig
type 'a t
type write = bytes -> unit
type 'a callbacks
type generic
type params = {
channels : int;
bits_per_sample : int;
sample_rate : int;
compression_level : int option;
total_samples : int64 option;
}
type comments = (string * string) list
exception Invalid_data
val get_callbacks :
?seek:(int64 -> unit) ->
?tell:(unit -> int64) ->
Flac.Encoder.write -> Flac.Encoder.generic Flac.Encoder.callbacks
val create :
?comments:Flac.Encoder.comments ->
Flac.Encoder.params -> 'a Flac.Encoder.callbacks -> 'a Flac.Encoder.t
val process :
'a Flac.Encoder.t ->
'a Flac.Encoder.callbacks -> float array array -> unit
val finish : 'a Flac.Encoder.t -> 'a Flac.Encoder.callbacks -> unit
val from_s16le : string -> int -> float array array
module File :
sig
type file
type handle = {
fd : Unix.file_descr;
enc : Flac.Encoder.File.file Flac.Encoder.t;
callbacks : Flac.Encoder.File.file Flac.Encoder.callbacks;
}
val create_from_fd :
?comments:Flac.Encoder.comments ->
Flac.Encoder.params -> Unix.file_descr -> Flac.Encoder.File.handle
val create :
?comments:Flac.Encoder.comments ->
Flac.Encoder.params -> string -> Flac.Encoder.File.handle
end
end