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
| Signature | Name | Description |
|---|---|---|
FAudioGeneratorRunner(std::shared_ptr<IAudioGenerator> generator, uint32_t chann… | FAudioGeneratorRunner | |
FAudioGeneratorRunner(const FAudioGeneratorRunner&) = delete | FAudioGeneratorRunner |
Public functions
| Returns | Name | Description |
|---|---|---|
FAudioGeneratorRunner& | operator= | |
void | PostStart | Any thread, lock-free. |
void | PostStop | |
void | PostReset | |
void | Read | Audio thread. |
bool | IsRunning | True once a Start has been applied and no Stop since (audio-thread view). |
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). |
uint32_t | GetChannels | |
uint32_t | GetSampleRate | |
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&) = deleteoperator=
C++
FAudioGeneratorRunner& operator=(const FAudioGeneratorRunner&) = deletePostStart
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() constTrue 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() constGetSampleRate
C++
uint32_t GetSampleRate() constGetGenerator
C++
const std::shared_ptr<IAudioGenerator>& GetGenerator() constGenerated from Audio/AudioGenerator.h via audio.json · Dec 5, 2026Version 1.1.0