Gin
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
FuncState Struct Reference

Base class for storing state in audio functions. More...

#include <gin_audiofunctions.h>

Inheritance diagram for FuncState:

Public Member Functions

 FuncState (double sr)
 
virtual ~FuncState ()=default
 
virtual void setSampleRate (double sr)
 
virtual void reset ()
 

Public Attributes

double sampleRate = 44100.0
 

Detailed Description

Base class for storing state in audio functions.

FuncState provides a base for stateful audio functions used in AudioEquationParser. While pure functions don't have state, audio filters and oscillators need to maintain internal state between samples (filter histories, oscillator phases, etc.). This class manages that state and provides sample rate change notification.

All audio function state classes (filter states, oscillator states) derive from this base to provide consistent state management and sample rate handling.

See also
AudioFunctionHost, AudioEquationParser

Constructor & Destructor Documentation

◆ FuncState()

FuncState::FuncState ( double  sr)

◆ ~FuncState()

virtual FuncState::~FuncState ( )
virtualdefault

Member Function Documentation

◆ setSampleRate()

virtual void FuncState::setSampleRate ( double  sr)
virtual

References sampleRate.

◆ reset()

virtual void FuncState::reset ( )
virtual

Member Data Documentation

◆ sampleRate

double FuncState::sampleRate = 44100.0

The documentation for this struct was generated from the following file: