Since 1.16the audio properties of the buffer
the number of valid samples in the buffer
Optionaloffsets: number[]the offsets (in bytes) where each channel plane starts in the buffer or null to calculate it (see below); must be null also when info->layout is GstAudio.AudioLayout.INTERLEAVED
the GstAudio.AudioMeta that was attached on the buffer
Allocates and attaches a GstAudio.AudioMeta on
buffer, which must be writable for that purpose. The fields of the GstAudio.AudioMeta are directly populated from the arguments of this function.When
info->layout is GstAudio.AudioLayout.NON_INTERLEAVED andoffsetsisnull, the offsets are calculated with a formula that assumes the planes are tightly packed and in sequence: offsets[channel] = channel *samples* sample_strideIt is not allowed for channels to overlap in memory, i.e. for each i in [0, channels), the range [
offsets[i],offsets[i] +samples* sample_stride) must not overlap with any other such range. This function will assert if the parameters specified cause this restriction to be violated.It is, obviously, also not allowed to specify parameters that would cause out-of-bounds memory access on
buffer. This is also checked, which means that you must add enough memory on thebufferbefore adding this meta.