module Encoder:Encode native FLAC datasig
..end
(* A function to write encoded data *) let write = (..a function of type write..) in (* Create the encoding callbacks *) let callbacks = Flac.Encoder.get_callbacks write in (* Define the parameters and comments *) let params = (..a value of type params ..) in let comments = [("title","FLAC encoding example")] in (* Create an encoder *) let enc = Flac.Encoder.create ~comments params callbacks in (* Encode data *) let data = (..a value of type float array array.. in Flac.Encoder.process enc callbacks data ; (..repeat encoding process..) (* Close encoder *) Flac.Encoder.finish enc callbacks
Remarks:
seek
callback is given. type 'a
t
typewrite =
string -> unit
type 'a
callbacks
type
generic
type
params = {
|
channels : |
|
bits_per_sample : |
|
sample_rate : |
|
compression_level : |
|
total_samples : |
typecomments =
(string * string) list
exception Invalid_data
val get_callbacks : ?seek:(int64 -> unit) ->
?tell:(unit -> int64) ->
write -> generic callbacks
val create : ?comments:comments ->
params -> 'a callbacks -> 'a t
val process : 'a t -> 'a callbacks -> float array array -> unit
val finish : 'a t -> 'a callbacks -> unit
val from_s16le : string -> int -> float array array
module File:sig
..end