MCPcopy Create free account
hub / github.com/amsynth/amsynth / SetSampleRate

Method SetSampleRate

src/core/synth/SoftLimiter.cpp:30–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28#define THRESHOLD 0.9 // THRESHOLD>0 !!
29
30void
31SoftLimiter::SetSampleRate (int rate)
32{
33 xpeak=0;
34 attack=1-exp(-2.2/(AT*(float)rate));
35 release=1-exp(-2.2/(RT*(float)rate));
36 thresh=(float)log(THRESHOLD); // thresh in linear scale :)
37}
38
39void
40SoftLimiter::Process (float *l, float *r, unsigned nframes, int stride)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected