Avutil.AudioAudio frames. The timestamps and the metadata are in Frame; the samples are read and written through the resampling library.
val create_frame :
Sample_format.t ->
Channel_layout.t ->
int ->
int ->
audio framecreate_frame sample_format channel_layout sample_rate nb_samples returns a new audio frame with that sample format, a copy of that channel layout, that sample rate in Hz, and buffers allocated by FFmpeg for nb_samples samples per channel. The sample data is unspecified.
val frame_get_sample_format : audio frame -> Sample_format.tThe sample format of the frame.
val frame_get_channel_layout : audio frame -> Channel_layout.tA copy of the frame's channel layout, independent of the frame.
type frame_format = {sample_format : Sample_format.t;sample_rate : int;channel_layout : Channel_layout.t;}What a consumer of audio frames is configured for: a frame whose format differs from the one before needs that consumer set up again.
val frame_format : audio frame -> frame_formatThe format of the frame.
val same_frame_format : frame_format -> frame_format -> boolWhether two formats are the same. Channel layouts are compared with Channel_layout.compare.