#include <streaming_sample_source.hpp>
Public Attributes | |
| std::uint32_t | channels = 0 |
| Source channel count (1 or 2 typical). | |
| std::uint64_t | total_frames = 0 |
| Total length of the source in frames. | |
| std::uint32_t | sample_rate = 0 |
| Source sample rate (carried, not resampled here). | |
| std::uint64_t | preload_frames = 0 |
| Resident head length in frames. | |
| std::uint64_t | ring_capacity_frames = 0 |
| Streamed-tail ring capacity in frames. | |
| std::uint64_t | read_chunk_frames = 8192 |
| Background read granularity in frames (how much the reader pulls per refill step). | |
| bool | loop = false |
| Loop the playback. | |
| std::uint64_t | loop_start = 0 |
| Loop start frame (resident-loop only). | |
| std::uint64_t | loop_end = 0 |
| Loop end frame, exclusive; 0 means total_frames. | |
| bool | start_background_thread = true |
| Spawn the owned background reader thread in prepare(). | |
| StreamingUnderrunPolicy | underrun_policy |
| Whether a streaming underrun preserves the source cursor or consumes its missing interval. | |
| std::uint64_t | max_read_ahead_frames = 0 |
| Maximum distance the reader may produce ahead of the play cursor. | |
| std::uint32_t pulp::audio::StreamingSampleSourceConfig::channels = 0 |
Source channel count (1 or 2 typical).
| bool pulp::audio::StreamingSampleSourceConfig::loop = false |
Loop the playback.
Honored only for fully-resident sources; streamed sources play once and then report finished().
| std::uint64_t pulp::audio::StreamingSampleSourceConfig::loop_end = 0 |
Loop end frame, exclusive; 0 means total_frames.
| std::uint64_t pulp::audio::StreamingSampleSourceConfig::loop_start = 0 |
Loop start frame (resident-loop only).
| std::uint64_t pulp::audio::StreamingSampleSourceConfig::max_read_ahead_frames = 0 |
Maximum distance the reader may produce ahead of the play cursor.
Zero leaves read-ahead bounded only by ring capacity. Deadline-bound sources use this to separate callback-sized storage from their production lookahead horizon.
| std::uint64_t pulp::audio::StreamingSampleSourceConfig::preload_frames = 0 |
Resident head length in frames.
Clamped to [0, total_frames]. The head guarantees a glitch-free note-on even if the reader thread is busy. When preload_frames >= total_frames the source is fully resident.
| std::uint64_t pulp::audio::StreamingSampleSourceConfig::read_chunk_frames = 8192 |
Background read granularity in frames (how much the reader pulls per refill step).
Clamped to the ring capacity. Ignored when fully resident.
| std::uint64_t pulp::audio::StreamingSampleSourceConfig::ring_capacity_frames = 0 |
Streamed-tail ring capacity in frames.
Must comfortably exceed the audio block size; a few hundred ms is typical. Ignored when fully resident.
| std::uint32_t pulp::audio::StreamingSampleSourceConfig::sample_rate = 0 |
Source sample rate (carried, not resampled here).
| bool pulp::audio::StreamingSampleSourceConfig::start_background_thread = true |
Spawn the owned background reader thread in prepare().
Set false to drive refills manually via pump_background() (deterministic testing).
| std::uint64_t pulp::audio::StreamingSampleSourceConfig::total_frames = 0 |
Total length of the source in frames.
| StreamingUnderrunPolicy pulp::audio::StreamingSampleSourceConfig::underrun_policy |
Whether a streaming underrun preserves the source cursor or consumes its missing interval.
Generated deadline-bound content advances; ordinary sample playback preserves every frame.