clip


Description:

public static Buffer? clip (owned Buffer buffer, Segment segment, int rate, int bpf)

Clip the buffer to the given Segment.

After calling this function the caller does not own a reference to buffer anymore.

Parameters:

buffer

The buffer to clip.

segment

Segment in TIME or DEFAULT to which the buffer should be clipped.

rate

sample rate.

bpf

size of one audio frame in bytes. This is the size of one sample * number of channels.

Returns: