Class PlanarSampleBlock

Class Documentation

class PlanarSampleBlock

a block of planar samples

see also InterleavedSampleBlock, which is equivalent but with interleaved channels

Public Functions

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

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

inline PlanarSampleBlock(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()[c * info().sample_count + s]

inline float *data()

access the sample data

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