module Samplerate: sig
.. end
exception Invalid_data
type
converter = float -> float array -> int -> int -> float array
A converter takes a convertion ratio (output samplerate / input
samplerate), an audio buffer, an offset in the buffer, a duration in the
buffer and returns a resampled buffer.
type
converter_plug = unit -> converter
type
t
val samplerate_conf : Dtools.Conf.ut
val converters : converter_plug Plug.plug
val create : int -> t
create chan_nb
creates a converter.
val resample : t ->
float -> float array array -> int -> int -> float array array
resample converter ratio data offset length
: converts input data
at given ratio.
Raises Invalid_data
if number of channels do not match
the number passed at create
.