API for implementing AudioReaders module

API for implementing AudioReaders.

Class AudioReader provides an interface for reading audio files.

The AudioReader provides two actual operations on the input file: it can either analyze the file via acquire_size() or actually process the file via process_file(), which yields the actual calculation results. An AudioReader is a SampleProvider and hence a SampleProcessor can be attached to it.

An AudioReader internally holds a concrete instance of AudioReaderImpl. AudioReaderImpl can be subclassed to implement the capabilities of an AudioReader.

The concrete reading of a given audio file is implemented by the subclasses of AudioReaderImpl. An AudioReaderImpl can be set to a block size, that may or may not refer to a buffer size, depending on the actual implementation.

CDDAValidator provides a uniform implementation of checking sample size, sampling rate and number of channels of an input audio file for CDDA conformity.

AudioValidator wraps a CDDAValidator with error tracking for easy registering validation functionality to an AudioReaderImpl. It provides default implementations for CDDA testing. Subclasses are supposed to add validation for the concrete format and codec.

Validation failures are reported as InvalidAudioException.

BigEndianBytes and LittleEndianBytes decode short sequences of single chars to integers.

Classes

class arcsdec::v_1_0_0::AudioReader
Read audio files and provide the decoded samples.
class arcsdec::v_1_0_0::AudioReaderImpl
Abstract base class for AudioReader implementations.
class arcsdec::v_1_0_0::AudioValidator
Base class for validation handlers for AudioReaderImpls.
struct arcsdec::v_1_0_0::BigEndianBytes
Service: interpret sequences of 2 or 4 big endian bytes as integer.
struct arcsdec::v_1_0_0::CDDAValidator
Service: verify the CDDA conformity of values.
class arcsdec::v_1_0_0::DefaultValidator
Default implementation of AudioValidator.
class arcsdec::v_1_0_0::InvalidAudioException
Reports validation failure on audio data.
struct arcsdec::v_1_0_0::LittleEndianBytes
Service: interpret sequences of 2 or 4 little-endian bytes as integer.

Variables

const int32_t MAX_SAMPLES_TO_READ
Maximum number of PCM 32 bit samples to read from a file.

Variable documentation

const int32_t MAX_SAMPLES_TO_READ

Maximum number of PCM 32 bit samples to read from a file.

This is equivalent to the product of the maximal lba block address the redbook standard accepts (449.999 frames) and the number of samples per lba frame (588).

The numerical value is 264.599.412.