87 uint64_t
render(
float* out, uint64_t frameCount);
140 [[nodiscard]]
const std::string&
name()
const;
Result build(uint32_t sampleRate, uint32_t frameSize)
Decode clips and build the miniaudio node graph.
bool isPlaying() const
True while the flow is playing on the device.
AudioFlowGraph(const AudioFlowGraph &)=delete
uint64_t readForPlayback(float *out, uint64_t frameCount)
Pull the next chunk of interleaved PCM for the device thread. Only valid while the flow is playing; t...
uint32_t channels() const
Result setParam(uint32_t settingIndex, float value)
Apply a value (clamped to the setting range) to a setting.
const std::string & name() const
const std::string & lastError() const
void free()
Release the built graph so the flow can be load()/build()ed again.
uint64_t render(float *out, uint64_t frameCount)
Pull the next chunk of interleaved f32 PCM from the flow cursor.
Result
Result codes; numbering mirrors the sab_* ABI (AudioBridge.h).
void finishPlayback()
Mark playback as finished (called from the device thread when a finite, non-looping flow reaches its ...
void setLooping(bool loop)
Override looping on all clip data sources (per-instance).
Result startPlayback()
Enter realtime playback mode for this flow. Rewinds to frame 0 and marks the flow as playing....
Result load(const char *flowJson, const char *baseDir)
Parse and validate a flow JSON document (schema version 1).
bool isSpatialized() const
uint64_t playbackPosition() const
Frames consumed during the current playback session. Updated by the audio thread; clamped by callers ...
uint32_t sampleRate() const
void stopPlayback()
Leave realtime playback mode.
uint32_t settingCount() const
std::unique_ptr< Impl > impl_
Result reset()
Rewind the cursor to frame 0; current param values are re-applied.
uint64_t duration() const
Total frames of the flow, or 0 when it loops forever.
AudioFlowGraph & operator=(const AudioFlowGraph &)=delete