12 #ifndef ROC_AUDIO_PCM_MAPPER_H_
13 #define ROC_AUDIO_PCM_MAPPER_H_
69 size_t map(
const void* in_data,
PCM format mapper. Convert between PCM formats.
size_t output_sample_count(size_t output_bytes) const
Get number of input samples per channel for given number of bytes.
PcmMapper(PcmFormat input_fmt, PcmFormat output_fmt)
Initialize.
size_t map(const void *in_data, size_t in_byte_size, size_t &in_bit_off, void *out_data, size_t out_byte_size, size_t &out_bit_off, size_t n_samples)
Map samples from input to output format.
size_t output_bit_count(size_t output_samples) const
Get number of output bits for given number of samples per channel.
PcmFormat input_format() const
Get input format.
size_t input_sample_count(size_t input_bytes) const
Get number of input samples per channel for given number of bytes.
size_t input_bit_count(size_t input_samples) const
Get number of input bits for given number of samples per channel.
PcmFormat output_format() const
Get output format.
size_t input_byte_count(size_t input_samples) const
Get number of input bytes for given number of samples per channel.
size_t output_byte_count(size_t output_samples) const
Get number of output bytes for given number of samples per channel.
Base class for non-copyable objects.
void(* PcmMapFn)(const uint8_t *in_data, size_t &in_bit_off, uint8_t *out_data, size_t &out_bit_off, size_t n_samples)
PCM mapping function.
PcmFormat
PCM format. Defines PCM sample coding and endian.
Commonly used types and functions.
PCM format meta-information.