Class InterleavedSampleBlock

Class Documentation

class InterleavedSampleBlock

a block of samples in which samples for each channel are interleaved

see also PlanarSampleBlock, which is equivalent but with planar (non-interleaved) channels

Public Functions

inline InterleavedSampleBlock(std::vector<float> samples, BlockDescription blockInfo)

construct with existing samples, which must have a size of sample_count * channel_count

inline InterleavedSampleBlock(BlockDescription blockInfo)

construct with zero-valued samples

inline BlockDescription const &info() const

get the block description (sample and channel count, sample rate)

inline float sample(size_t channel, size_t sample) const

access a single sample

inline float &sample(size_t channel, size_t sample)

access a single sample

inline const float *data() const

access the sample data

sample s of channel c is at data()[s * info().channel_count + c]

inline float *data()

access the sample data

sample s of channel c is at data()[s * info().channel_count + c]