Player12
An open source football management simulator
Loading...
Searching...
No Matches
Audio::Drift Class Reference

#include <synth.h>

Public Member Functions

 Drift (std::uint32_t seed, float ratePerSecond)
 
float step (float seconds)
 
float value () const
 

Private Attributes

Noise noise
 
float rate
 
float current = 0.5f
 
float target = 0.5f
 

Detailed Description

Slow bounded random walk in [0, 1] used for swells and murmurs.

Constructor & Destructor Documentation

◆ Drift()

Audio::Drift::Drift ( std::uint32_t  seed,
float  ratePerSecond 
)
inlineexplicit

Member Function Documentation

◆ step()

float Audio::Drift::step ( float  seconds)

Advances by seconds (call at control rate).

◆ value()

float Audio::Drift::value ( ) const
inline

Member Data Documentation

◆ current

float Audio::Drift::current = 0.5f
private

◆ noise

Noise Audio::Drift::noise
private

◆ rate

float Audio::Drift::rate
private

◆ target

float Audio::Drift::target = 0.5f
private

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