module Lame:sig
..end
Author(s): Samuel Mimram
val get_lame_version : unit -> string
val get_lame_short_version : unit -> string
get_lame_version
).val get_lame_very_short_version : unit -> string
get_lame_short_version
).val get_lame_url : unit -> string
val get_psy_version : unit -> string
type
encoder
val create_encoder : unit -> encoder
val set_in_samplerate : encoder -> int -> unit
val set_num_channels : encoder -> int -> unit
val set_out_samplerate : encoder -> int -> unit
val set_quality : encoder -> int -> unit
type
mode =
| |
Stereo |
(* |
stereo, channels encoded independely
| *) |
| |
Joint_stereo |
(* |
stereo, channels encoded together
| *) |
| |
Dual_channel |
(* |
not supported
| *) |
| |
Mono |
(* |
mono
| *) |
val set_mode : encoder -> mode -> unit
type
vbr_mode =
| |
Vbr_off |
(* |
constant bitrate
| *) |
| |
Vbr_rh |
|||
| |
Vbr_abr |
|||
| |
Vbr_mtrh |
|||
| |
Vbr_max_indicator |
val set_vbr_mode : encoder -> vbr_mode -> unit
val set_vbr_quality : encoder -> int -> unit
val set_vbr_mean_bitrate : encoder -> int -> unit
Vbr_abr
mode.val set_vbr_min_bitrate : encoder -> int -> unit
val set_vbr_max_bitrate : encoder -> int -> unit
val set_vbr_hard_min : encoder -> bool -> unit
true
, enforce the minimal VBR bitrate. Normally it will be violated
for analog silence.val set_brate : encoder -> int -> unit
set_compression_ratio
.val set_compression_ratio : encoder -> float -> unit
val set_private : encoder -> bool -> unit
val get_private : encoder -> bool
val set_copyright : encoder -> bool -> unit
val get_copyright : encoder -> bool
val set_original : encoder -> bool -> unit
val get_original : encoder -> bool
exception Init_params_failed
init_params
failed for some reason.val init_params : encoder -> unit
Init_params_failed
on error.val init_bitstream : encoder -> unit
init_params
. You can call this after encode_flush_nogap
.exception Init_params_not_called
init_params
.exception Psychoacoustic_problem
exception Unknown_error of int
val encode_buffer_part : encoder -> string -> int -> int -> string
encode_buffer_part enc buf ofs smpl
encodes samples
samples (per channel) of buf
starting at position ofs
.val encode_buffer : encoder -> string -> int -> string
encode_buffer_part
but with ofs = 0
.val encode_buffer_float_part : encoder -> float array -> float array -> int -> int -> string
encode_buffer_float_part enc left right ofs smpl
encodes samples
samples of left
and right
channels starting at position ofs
.
Floats are expected to range over -1;1
.val encode_buffer_float : encoder -> float array -> float array -> int -> string
encode_buffer_float_part
but with ofs = 0
.val encode_flush : encoder -> string
val encode_flush_nogap : encoder -> string
module Id3tag:sig
..end
type
mpeg_version =
| |
Mpeg_1 |
(* |
MPEG v1
| *) |
| |
Mpeg_2 |
(* |
MPEG v2
| *) |
| |
Mpeg_2_5 |
(* |
MPEG v2.5
| *) |
val get_version : encoder -> mpeg_version
val get_encoder_delay : encoder -> int
val get_framesize : encoder -> int
val get_nb_samples_to_encode : encoder -> int
val get_nb_encoded_frames : encoder -> int
val get_nb_frames : encoder -> int
set_nb_samples
was called).