Skip to main content

Module fake

Module fake 

Source
Expand description

A fake renderer for tests: a seeded additive synth with no plug-in.

Its patch is JSON in the preset state, under settings as in a Vital state, so the load check reads it back the same way. Each note sums the patch’s harmonics under a linear attack and an exponential release, and a render draws a random phase per harmonic and a small level jitter, so repeat renders vary the way a synth with random unison phases does. Faults stand in for a plug-in that crashes, hangs or stays silent. A hang is simulated: the render returns RenderError::TimedOut at once and never waits.

The fake keeps no sound between renders, so the pre-roll changes nothing in its clip. It still steps through the state load and the pre-roll of each render, and FakeRenderer::with_log records the steps. It remembers the last state it loaded, which Renderer::save_state returns; before any load it holds FakePatch::init.

Structs§

FakePatch
The sound of the fake synth.
FakeRenderer
A seeded additive synth behind the Renderer trait.

Enums§

FakeStep
A step the fake played, in the order a plug-in host plays them.
Fault
A fault the fake renderer injects into one render.

Type Aliases§

FakeLog
The steps that renderers played, shared between renderers.