Contents

sampleSize(at:)

Returns the size of a sample in bytes.

Declaration

func sampleSize(at sampleIndex: Int) -> Int

Parameters

  • sampleIndex:

    The index of the sample to query.

Return Value

The size of the sample.

Discussion

If you specify a sample index that isn’t in the range, the system returns 0. It also returns 0 if the sample buffer contains no sizes, which occurs if the samples in the buffer are noncontiguous, such as noninterleaved audio, or if the sample buffer contains a CVImageBuffer.

See Also

Inspecting Size Information