class

FAudioGeneratorRunner

Drives one generator the way the audio thread does: Start / Stop / Reset are posted from any thread and applied, in that order of importance, at the start of the next Read. The miniaudio data source is a thin shim over Read, and a test calls Read directly, so the pull path is exercised without a device.

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

Constructors

SignatureNameDescription
FAudioGeneratorRunner(std::shared_ptr<IAudioGenerator> generator, uint32_t chann…FAudioGeneratorRunner
FAudioGeneratorRunner(const FAudioGeneratorRunner&) = deleteFAudioGeneratorRunner

Public functions

ReturnsNameDescription
FAudioGeneratorRunner&operator=
voidPostStartAny thread, lock-free.
voidPostStop
voidPostReset
voidReadAudio thread.
boolIsRunningTrue once a Start has been applied and no Stop since (audio-thread view).
voidFlushStopDelivers a pending Stop to a generator whose voice is gone, from the thread that tore the voice down (nothing pulls it any more).
uint32_tGetChannels
uint32_tGetSampleRate
const std::shared_ptr<IAudioGenerator>&GetGenerator

Function details

FAudioGeneratorRunner

C++
FAudioGeneratorRunner(std::shared_ptr<IAudioGenerator> generator, uint32_t channels, uint32_t sampleRate)

FAudioGeneratorRunner

C++
FAudioGeneratorRunner(const FAudioGeneratorRunner&) = delete

operator=

C++
FAudioGeneratorRunner& operator=(const FAudioGeneratorRunner&) = delete

PostStart

C++
void PostStart()

Any thread, lock-free. The last of Start / Stop wins when both land in one block.

PostStop

C++
void PostStop()

PostReset

C++
void PostReset()

Read

C++
void Read(float* interleaved, uint32_t frames)

Audio thread. Writes frames * channels floats; a missing generator or one that is not started yields silence. Never fails.

IsRunning

C++
bool IsRunning() const

True once a Start has been applied and no Stop since (audio-thread view).

FlushStop

C++
void FlushStop()

Delivers a pending Stop to a generator whose voice is gone, from the thread that tore the voice down (nothing pulls it any more).

GetChannels

C++
uint32_t GetChannels() const

GetSampleRate

C++
uint32_t GetSampleRate() const

GetGenerator

C++
const std::shared_ptr<IAudioGenerator>& GetGenerator() const
Generated from Audio/AudioGenerator.h via audio.json · Dec 5, 2026Version 1.1.0