#include <streaming_sample_source.hpp>
◆ StreamingSampleSource() [1/2]
| pulp::audio::StreamingSampleSource::StreamingSampleSource |
( |
| ) |
|
|
default |
◆ ~StreamingSampleSource()
| pulp::audio::StreamingSampleSource::~StreamingSampleSource |
( |
| ) |
|
◆ StreamingSampleSource() [2/2]
| pulp::audio::StreamingSampleSource::StreamingSampleSource |
( |
const StreamingSampleSource & | | ) |
|
|
delete |
◆ channels()
| std::uint32_t pulp::audio::StreamingSampleSource::channels |
( |
| ) |
const |
|
inlinenoexcept |
◆ finished()
| bool pulp::audio::StreamingSampleSource::finished |
( |
| ) |
const |
|
noexcept |
True once a non-looping source has played to its end and the tail is drained.
Always false for a resident loop. RT-safe.
◆ fully_resident()
| bool pulp::audio::StreamingSampleSource::fully_resident |
( |
| ) |
const |
|
inlinenoexcept |
True when the whole source fits in the preload window (no streaming).
◆ operator=()
◆ position()
| std::uint64_t pulp::audio::StreamingSampleSource::position |
( |
| ) |
const |
|
inlinenoexcept |
Current play position in source frames. RT-safe.
◆ prepare() [1/2]
Allocate buffers, synchronously fill the preload window via reader, and (optionally) start the background reader thread.
Control thread only. Returns false on invalid config or a failed preload read.
◆ prepare() [2/2]
◆ prepared()
| bool pulp::audio::StreamingSampleSource::prepared |
( |
| ) |
const |
|
inlinenoexcept |
◆ pull()
| std::uint64_t pulp::audio::StreamingSampleSource::pull |
( |
BufferView< float > | dest, |
|
|
std::uint64_t | frames ) |
|
noexcept |
Emit frames sequential frames into dest, advancing the play cursor.
Returns the number of non-silent frames produced; the remainder of dest is zero-filled (end-of-source, or a streaming underrun, which is counted in stats()). Allocation-free, lock-free, wait-free.
◆ pump_background()
| std::uint64_t pulp::audio::StreamingSampleSource::pump_background |
( |
| ) |
|
|
noexcept |
Top the streamed-tail ring up toward full using the FrameReader.
Called automatically by the owned thread; call it directly when the thread is disabled (tests). Reads at most one read_chunk per invocation that there is room and remaining source for. No-op for resident sources. Returns the number of frames pushed into the ring this call.
◆ release()
| void pulp::audio::StreamingSampleSource::release |
( |
| ) |
|
|
noexcept |
Stop the reader thread and free all storage. Control thread only.
◆ reset()
| bool pulp::audio::StreamingSampleSource::reset |
( |
| ) |
|
|
noexcept |
Rewind to the start of the source (or loop_start) and refill the tail.
Control thread / quiescent only — not RT-safe (it may re-read and resets the background cursor). Returns false if not prepared.
◆ stats()
| Stats pulp::audio::StreamingSampleSource::stats |
( |
| ) |
const |
|
noexcept |
◆ total_frames()
| std::uint64_t pulp::audio::StreamingSampleSource::total_frames |
( |
| ) |
const |
|
inlinenoexcept |
The documentation for this class was generated from the following file: