|
HART
0.2.0
High level Audio Regression and Testing
|
Base class for signals. More...
#include <hart_signal.hpp>
Public Member Functions | |
| Derived & | followedBy (const DSPBase< SampleType > &dsp) |
| Adds a DSP effect to the end of signal's DSP chain by copying it. | |
| Signal & | followedBy (std::unique_ptr< DSPBase< SampleType > > dsp) |
| Adds a DSP effect to the end of signal's DSP chain by transfering a smart pointer. | |
| template<typename DerivedDSP , typename = typename std::enable_if< std::is_base_of< DSPBase<SampleType>, typename std::decay<DerivedDSP>::type >::value >::type> | |
| Signal & | followedBy (DerivedDSP &&dsp) |
| Adds a DSP effect to the end of signal's DSP chain by moving it. | |
| std::unique_ptr< SignalBase< SampleType > > | copy () const override |
| Returns a smart pointer with a copy of this object. | |
| std::unique_ptr< SignalBase< SampleType > > | move () override |
| Returns a smart pointer with a moved instance of this object. | |
| Derived & | skipTo (double startTimestampSeconds) |
| Skips the signal to a specific timestamp. | |
| Derived | operator- () const |
| Returns a copy of this signal, but with flipped phase. | |
| Derived | operator~ () const |
| Returns a copy of this signal, but with flipped phase. | |
Public Member Functions inherited from SignalBase< SampleType > | |
| SignalBase ()=default | |
| Default constructor. | |
| SignalBase (const SignalBase &other) | |
| Copies other signal. | |
| SignalBase (SignalBase &&other) noexcept | |
| Moves from other signal. | |
| virtual | ~SignalBase ()=default |
| Destructor. | |
| SignalBase & | operator= (const SignalBase &other) |
| Copies from other signal. | |
| SignalBase & | operator= (SignalBase &&other) noexcept |
| Moves from other signal. | |
| virtual bool | supportsNumChannels (size_t) const |
| Tells the host whether this Signal is capable of generating audio for a certain amount of channels. | |
| virtual bool | supportsSampleRate (double) const |
| Tells whether this Signal supports given sample rate. | |
| virtual void | prepare (double sampleRateHz, size_t numOutputChannels, size_t maxBlockSizeFrames)=0 |
| Prepare the signal for rendering. | |
| virtual void | renderNextBlock (AudioBuffer< SampleType > &output)=0 |
| Renders next block audio for the signal. | |
| virtual void | reset ()=0 |
| Resets the Signal to initial state. | |
| virtual void | represent (std::ostream &stream) const =0 |
| Makes a text representation of this Signal for test failure outputs. | |
| void | prepareWithDSPChain (double sampleRateHz, size_t numOutputChannels, size_t maxBlockSizeFrames) |
| Prepares the signal and all attached effects in the DSP chain for rendering. | |
| void | renderNextBlockWithDSPChain (AudioBuffer< SampleType > &output) |
| Renders next block audio for the signal and all the effects in the DSP chain. | |
| virtual void | resetWithDSPChain () |
| Resets to Signal and all the effects attached to its DSP chain to initial state. | |
Additional Inherited Members | |
Protected Member Functions inherited from SignalBase< SampleType > | |
| void | setNumChannels (size_t numChannels) |
| size_t | getNumChannels () |
Protected Attributes inherited from SignalBase< SampleType > | |
| size_t | m_numChannels = 1 |
| double | m_startTimestampSeconds = 0.0 |
| std::vector< std::unique_ptr< DSPBase< SampleType > > > | dspChain |
Base class for signals.
| SampleType | Type of values that will be generated, typically float or double |
| Derived | Subclass for CRTP |
Definition at line 262 of file hart_signal.hpp.
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
Returns a smart pointer with a copy of this object.
Implements SignalBase< SampleType >.
Definition at line 307 of file hart_signal.hpp.
|
inlineoverridevirtual |
Returns a smart pointer with a moved instance of this object.
Implements SignalBase< SampleType >.
Definition at line 312 of file hart_signal.hpp.
Skips the signal to a specific timestamp.
Fast-forwards the signal, with all attaches DSP effects and their automation envelopes. Calling it multiple times on one instance will stack the skip times.
| startTimestampSeconds | How much time to skip from the start of the signal |
Definition at line 322 of file hart_signal.hpp.
Returns a copy of this signal, but with flipped phase.
Definition at line 332 of file hart_signal.hpp.
|
inline |
Returns a copy of this signal, but with flipped phase.
Definition at line 340 of file hart_signal.hpp.