|
Gin
|
State management for audio functions in AudioEquationParser. More...
#include <gin_audiofunctions.h>
Public Member Functions | |
| void | setSampleRate (double sr) |
| double | getSampleRate () |
| void | reset () |
| void | addConstants (gin::EquationParser &) |
| void | addUtilities (gin::EquationParser &) |
| void | addOscillatorFunctions (gin::EquationParser &) |
| void | addSynthFilterFunctions (gin::EquationParser &) |
| void | addEffectFilterFunctions (gin::EquationParser &) |
| template<class T > | |
| T * | getFuncParams (int i, double sr) |
Public Attributes | |
| gin::BandLimitedLookupTables * | lookupTables = nullptr |
Protected Attributes | |
| std::map< int, std::unique_ptr< FuncState > > | funcStates |
| double | sampleRate = 44100.0 |
State management for audio functions in AudioEquationParser.
AudioFunctionHost manages the state objects for all stateful audio functions (filters, oscillators, noise generators) used in audio equation parsing. It provides factory methods for creating and retrieving state objects, ensuring each function instance maintains its own state across evaluations.
Key Features:
The host maintains a map of state objects, creating them on-demand when functions are first called and reusing them for subsequent calls to maintain continuity (e.g., filter history, oscillator phase).
| double AudioFunctionHost::getSampleRate | ( | ) |
References sampleRate.
| void AudioFunctionHost::reset | ( | ) |
| void AudioFunctionHost::addConstants | ( | gin::EquationParser & | ) |
| void AudioFunctionHost::addUtilities | ( | gin::EquationParser & | ) |
| void AudioFunctionHost::addOscillatorFunctions | ( | gin::EquationParser & | ) |
| void AudioFunctionHost::addSynthFilterFunctions | ( | gin::EquationParser & | ) |
| void AudioFunctionHost::addEffectFilterFunctions | ( | gin::EquationParser & | ) |
References funcStates.
| gin::BandLimitedLookupTables* AudioFunctionHost::lookupTables = nullptr |
Referenced by getFuncParams().
|
protected |
Referenced by getSampleRate().