AudibleT 0.0.1
A real-time A/B/X audio testing tool for subjective assessment of various audio parameters, compatible for general purpose computer as well as embedded systems.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
BaseFilter Class Referenceabstract

An abstract class that defines a basic audio filter. More...

#include <BaseFilter.h>

Inheritance diagram for BaseFilter:
Inheritance graph
[legend]

Public Member Functions

virtual ~BaseFilter ()
 Destructor.
 
virtual std::vector< float > process_buffer (std::vector< float > &inputBuffer)=0
 Pure virtual function to process a buffer of input samples.
 
virtual float process_sample (float sample)=0
 Process a single sample through the filter.
 

Detailed Description

An abstract class that defines a basic audio filter.

Derived classes must implement the process_sample() function, which processes an audio sample.

Constructor & Destructor Documentation

◆ ~BaseFilter()

BaseFilter::~BaseFilter ( )
virtual

Destructor.

Empty distructor for BaseFilter class.

Derived classes must implement the distructor.

Member Function Documentation

◆ process_buffer()

virtual std::vector< float > BaseFilter::process_buffer ( std::vector< float > &  inputBuffer)
pure virtual

Pure virtual function to process a buffer of input samples.

This function is expected to be overridden in any class that inherits from this base class. The overriding function should take a vector of floating point samples as input, process each sample, and return a new vector containing the processed samples.

This method should be used when it's more efficient to process a whole buffer of samples at once, rather than calling a process function on each individual sample.

Parameters
inputBufferA vector of input samples to be processed.
Returns
A vector of output samples that have been processed.

Implemented in ShelfFilter.

◆ process_sample()

virtual float BaseFilter::process_sample ( float  sample)
pure virtual

Process a single sample through the filter.

This is a pure virtual function that must be implemented by any class that inherits from this class. This function is called for each sample in the audio stream and processes the sample through the filter.

Parameters
sampleThe sample to be processed. This is expected to be a floating point value representing the audio sample.
Returns
The processed sample. The processing applied to the sample will depend on the specifics of the filter that implements this function.

Implemented in ShelfFilter.


The documentation for this class was generated from the following files: