Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
event_compensation.hpp File Reference
#include <pulp/playback/program.hpp>
#include <pulp/playback/transport.hpp>
#include <pulp/timebase/rational_time.hpp>
#include <array>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <span>

Go to the source code of this file.

Classes

struct  pulp::playback::EventCompensationShift
 One event-injection point's prepared scheduling shift, counted in samples at the program's compiled sample rate. More...
struct  pulp::playback::EventCompensationResult
struct  pulp::playback::CompensatedReadSegment
 One contiguous run of a compensated read window after an enabled loop has been applied to it. More...
struct  pulp::playback::CompensatedReadPlan
 How a compensated read window resolves against an enabled loop. More...

Namespaces

namespace  pulp
namespace  pulp::playback

Enumerations

enum class  pulp::playback::EventCompensationCode : std::uint8_t { pulp::playback::Ok , pulp::playback::NegativeDeviceLatency , pulp::playback::DeviceLatencyOutOfRange , pulp::playback::ChainShiftOutOfRange }

Functions

constexpr EventCompensationResult pulp::playback::accumulate_event_chain_shift (std::span< const int > device_latency_samples, int ceiling_samples) noexcept
 Accumulates the event-domain latency of one chain into a scheduling shift.
constexpr timebase::SamplePosition pulp::playback::shifted_range_origin (const TransportRange &range, EventCompensationShift shift) noexcept
 The sample position an event stream at a compensated injection point must be read from for range.
constexpr bool pulp::playback::range_admits_event_compensation (const TransportRange &range, EventCompensationShift shift) noexcept
 Whether a compensating shift has a defined meaning for range.
constexpr bool pulp::playback::loop_admits_event_compensation (const TransportRange &range, EventCompensationShift shift, timebase::SamplePosition loop_end_samples) noexcept
 Whether a compensating shift's read-ahead stays inside an enabled loop.
constexpr CompensatedReadPlan pulp::playback::plan_compensated_read (const TransportRange &range, EventCompensationShift shift) noexcept
 The one run a window that no loop bounds resolves to.
constexpr CompensatedReadPlan pulp::playback::plan_compensated_read (const TransportRange &range, EventCompensationShift shift, timebase::SamplePosition loop_start_samples, timebase::SamplePosition loop_end_samples) noexcept
 Wrap-aware read-ahead: the runs a compensated window reads when an enabled loop bounds it.
constexpr bool pulp::playback::event_compensation_admits_live_input (EventCompensationShift shift, ProviderSelectorProgram provider) noexcept
 Whether a track may offer live input while its event chain is compensated.