module Lame:sig..end
Author(s): Samuel Mimram
val get_lame_version : unit -> stringval get_lame_short_version : unit -> stringget_lame_version).val get_lame_very_short_version : unit -> stringget_lame_short_version).val get_lame_url : unit -> stringval get_psy_version : unit -> stringtype encoder
val create_encoder : unit -> encoderval set_in_samplerate : encoder -> int -> unitval set_num_channels : encoder -> int -> unitval set_out_samplerate : encoder -> int -> unitval set_quality : encoder -> int -> unittype mode =
| |
Stereo |
(* |
stereo, channels encoded independely
| *) |
| |
Joint_stereo |
(* |
stereo, channels encoded together
| *) |
| |
Dual_channel |
(* |
not supported
| *) |
| |
Mono |
(* |
mono
| *) |
val set_mode : encoder -> mode -> unittype vbr_mode =
| |
Vbr_off |
(* |
constant bitrate
| *) |
| |
Vbr_rh |
|||
| |
Vbr_abr |
|||
| |
Vbr_mtrh |
|||
| |
Vbr_max_indicator |
val set_vbr_mode : encoder -> vbr_mode -> unitval set_vbr_quality : encoder -> int -> unitval set_vbr_mean_bitrate : encoder -> int -> unitVbr_abr mode.val set_vbr_min_bitrate : encoder -> int -> unitval set_vbr_max_bitrate : encoder -> int -> unitval set_vbr_hard_min : encoder -> bool -> unittrue, enforce the minimal VBR bitrate. Normally it will be violated
for analog silence.val set_brate : encoder -> int -> unitset_compression_ratio.val set_compression_ratio : encoder -> float -> unitval set_private : encoder -> bool -> unitval get_private : encoder -> bool
val set_copyright : encoder -> bool -> unitval get_copyright : encoder -> bool
val set_original : encoder -> bool -> unitval get_original : encoder -> bool
exception Init_params_failed
init_params failed for some reason.val init_params : encoder -> unitInit_params_failed on error.val init_bitstream : encoder -> unitinit_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 -> stringencode_buffer_part enc buf ofs smpl encodes samples
samples (per channel) of buf starting at position ofs.val encode_buffer : encoder -> string -> int -> stringencode_buffer_part but with ofs = 0.val encode_buffer_float_part : encoder -> float array -> float array -> int -> int -> stringencode_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 -> stringencode_buffer_float_part but with ofs = 0.val encode_flush : encoder -> stringval encode_flush_nogap : encoder -> stringmodule 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_versionval get_encoder_delay : encoder -> intval get_framesize : encoder -> intval get_nb_samples_to_encode : encoder -> intval get_nb_encoded_frames : encoder -> intval get_nb_frames : encoder -> intset_nb_samples was called).