class

FOscillatorGenerator

The reference generator: a sine or white-noise oscillator with a frequency and a gain. Small enough to read as the example of the API, deterministic (Reset restores phase and noise seed), and what the tests render.

Module
Audio
Header
#include "Audio/AudioGenerator.h"
Namespace
Mowo

Constructors

SignatureNameDescription
FOscillatorGenerator(float frequency = 440.0f, float gain = 0.25f)FOscillatorGenerator

Public functions

ReturnsNameDescription
voidSetFrequencyGame thread.
voidSetGain
voidSetNoise
voidRenderAudio thread.
voidReset

Function details

FOscillatorGenerator

C++
FOscillatorGenerator(float frequency = 440.0f, float gain = 0.25f)

SetFrequency

C++
void SetFrequency(float hz)

Game thread.

SetGain

C++
void SetGain(float gain)

SetNoise

C++
void SetNoise(bool noise)

Render

C++
void Render(float* interleaved, uint32_t frames, uint32_t channels, uint32_t sampleRate) override

Audio thread.

Reset

C++
void Reset() override
Generated from Audio/AudioGenerator.h via audio.json · Dec 5, 2026Version 1.1.0