#include <buffered_content_source.hpp>
◆ BufferedContentSource() [1/2]
| pulp::playback::BufferedContentSource::BufferedContentSource |
( |
| ) |
|
|
default |
◆ ~BufferedContentSource()
| pulp::playback::BufferedContentSource::~BufferedContentSource |
( |
| ) |
|
|
inline |
◆ BufferedContentSource() [2/2]
| pulp::playback::BufferedContentSource::BufferedContentSource |
( |
const BufferedContentSource & | | ) |
|
|
delete |
◆ cancel_production()
| void pulp::playback::BufferedContentSource::cancel_production |
( |
| ) |
|
|
inlinenoexcept |
Control thread.
Asks the in-flight producer call to stop through its token and waits for it — bounded by one chunk: a cooperative producer returns early, one that never checks its token finishes the chunk. The interrupted chunk publishes nothing, so produced and starved counters stay coherent with the play cursor, and the next pump retries the same position. Cancellation does not latch: production resumes on the next pump. Use seek() or release() to end production.
◆ current_epoch()
The epoch production currently belongs to. RT-safe.
◆ declaration()
◆ declared_frames()
| std::uint64_t pulp::playback::BufferedContentSource::declared_frames |
( |
| ) |
const |
|
inlinenoexcept |
◆ exhausted()
| bool pulp::playback::BufferedContentSource::exhausted |
( |
| ) |
const |
|
inlinenoexcept |
True once every declared frame has been accounted for, produced or not.
◆ lookahead_frames()
Frames the declaration's wall-clock lookahead covers at sample_rate.
◆ loop_end_frame()
| std::uint64_t pulp::playback::BufferedContentSource::loop_end_frame |
( |
| ) |
const |
|
inlinenoexcept |
◆ loop_start_frame()
| std::uint64_t pulp::playback::BufferedContentSource::loop_start_frame |
( |
| ) |
const |
|
inlinenoexcept |
Declared loop region; both zero when no loop is declared.
◆ loop_wrap()
Control thread.
Restarts production at the declared loop head under a strictly newer epoch — the wrap half of a loop the transport owns. Returns false when no loop is declared or the epoch is not strictly newer.
◆ operator=()
◆ position()
| std::uint64_t pulp::playback::BufferedContentSource::position |
( |
| ) |
const |
|
inlinenoexcept |
Audio-thread position in content frames of the current epoch.
◆ prepare()
Control thread.
Rejects a declaration that is not coherent, or that does not declare Buffered — synchronous content has no ring to prepare.
◆ prepared()
| bool pulp::playback::BufferedContentSource::prepared |
( |
| ) |
const |
|
inlinenoexcept |
◆ pull()
| std::uint64_t pulp::playback::BufferedContentSource::pull |
( |
audio::BufferView< float > | destination, |
|
|
std::uint64_t | frames ) |
|
inlinenoexcept |
Audio thread.
Emits up to frames frames into destination and zero-fills whatever the producer did not supply, counting the shortfall. Returns the number of produced (non-zero-filled) frames.
◆ pump_background()
| std::uint64_t pulp::playback::BufferedContentSource::pump_background |
( |
| ) |
|
|
inlinenoexcept |
Background or host thread.
Runs the producer once toward topping the ring up, and returns the number of frames it pushed. Drive this directly when the owned thread is disabled.
◆ release()
| void pulp::playback::BufferedContentSource::release |
( |
| ) |
|
|
inlinenoexcept |
Control thread. Stops the producer and frees all storage.
◆ seek()
| bool pulp::playback::BufferedContentSource::seek |
( |
std::uint64_t | frame, |
|
|
BufferedContentEpoch | epoch ) |
|
inline |
Control thread; no pull() may be in flight.
Repositions production to content frame frame under epoch: the in-flight producer call is asked to stop and whatever it produced for the superseded epoch is discarded with the old ring, a fresh ring is primed at the new position, and the declared preroll is filled before the call returns. epoch must be nonzero and strictly newer than current_epoch(). Returns false on an invalid epoch, an out-of-range frame, or a preroll that cannot fit the remaining content — all without disturbing the current position — and false leaving the source released when the producer could not fill the declared preroll.
◆ stats()
| Stats pulp::playback::BufferedContentSource::stats |
( |
| ) |
const |
|
inlinenoexcept |
The documentation for this class was generated from the following file: