class
#include <audioreader.hpp>
v_1_0_0::AudioReaderImpl Abstract base class for AudioReader implementations.
Concrete subclasses of AudioReaderImpl implement AudioReaders for a concrete FileReaderDescriptor.
Base classes
- class v_1_0_0::SampleProvider
- Inteface for providers of sample sequences.
Constructors, destructors, conversion operators
- AudioReaderImpl()
- Default constructor.
Public functions
- auto acquire_size(const std::string& filename) -> std::unique_ptr<AudioSize>
- Provides implementation for acquire_
size() of a AudioReader. - auto descriptor() const -> std::unique_ptr<FileReaderDescriptor>
- Create a descriptor for this AudioReader implementation.
- void process_file(const std::string& filename)
- Provides implementation for process_
file() of some AudioReader. - auto samples_per_read() const -> std::size_t
- Return the number of samples to read in one read operation.
- void set_samples_per_read(const std::size_t samples_per_read)
- Set the number of samples to read in one read operation.
Protected functions
- void attach_processor_impl(SampleProcessor& processor)
- Default implementation of attach_
processor(). - auto use_processor() -> SampleProcessor*
- Use the internal SampleProcessor.
Private functions
- auto do_acquire_size(const std::string& filename) -> std::unique_ptr<AudioSize> pure virtual
- Provides implementation for
acquire_
of an AudioReader.size() - void do_process_file(const std::string& filename) pure virtual
- Provides implementation for process_
file() of some AudioReader.
Function documentation
std::unique_ptr<AudioSize> arcsdec:: v_1_0_0:: AudioReaderImpl:: acquire_size(const std::string& filename)
Provides implementation for acquire_
Parameters | |
---|---|
filename in | The filename of the file to process |
Returns | A CalcContext for the specified file |
Exceptions | |
FileReadException | If the file could not be read |
std::unique_ptr<FileReaderDescriptor> arcsdec:: v_1_0_0:: AudioReaderImpl:: descriptor() const
Create a descriptor for this AudioReader implementation.
Returns | Descriptor for this implementation. |
---|
void arcsdec:: v_1_0_0:: AudioReaderImpl:: process_file(const std::string& filename)
Provides implementation for process_
Parameters | |
---|---|
filename in | The filename of the file to process |
Returns | The checksums of this file |
Exceptions | |
FileReadException | If the file could not be read |
std::size_t arcsdec:: v_1_0_0:: AudioReaderImpl:: samples_per_read() const
Return the number of samples to read in one read operation.
Returns | Number of samples per read operation. |
---|
void arcsdec:: v_1_0_0:: AudioReaderImpl:: set_samples_per_read(const std::size_t samples_per_read)
Set the number of samples to read in one read operation.
Parameters | |
---|---|
samples_per_read in | Number of samples to read/buffer at once. |
The default is BLOCKSIZE::
std::unique_ptr<AudioSize> arcsdec:: v_1_0_0:: AudioReaderImpl:: do_acquire_size(const std::string& filename) pure virtual private
Provides implementation for acquire_
of an AudioReader.
Parameters | |
---|---|
filename in | The filename of the file to process |
Returns | A CalcContext for the specified file |
Exceptions | |
FileReadException | If the file could not be read |
void arcsdec:: v_1_0_0:: AudioReaderImpl:: do_process_file(const std::string& filename) pure virtual private
Provides implementation for process_
Parameters | |
---|---|
filename in | The filename of the file to process |
Returns | The checksums of this file |
Exceptions | |
FileReadException | If the file could not be read |