Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
host_transport_projector.hpp
Go to the documentation of this file.
1#pragma once
2
5
6#include <cstdint>
7
8namespace pulp::sequence {
9
22
23namespace detail {
26}
27
33 public:
35 std::uint32_t maximum_block_size) noexcept;
36
38 playback::TransportSnapshot& snapshot) noexcept;
39
40 void reset() noexcept;
41
42 private:
43 const timebase::CompiledTempoMap* tempo_map_ = nullptr;
44 std::uint32_t maximum_block_size_ = 0;
45 timebase::MonotonicBeat monotonic_{};
46 timebase::SamplePosition expected_next_sample_{};
47 playback::MeterSignature previous_meter_{};
48 playback::LoopRegion previous_loop_{};
49 std::uint64_t block_index_ = 0;
50 std::uint64_t playback_epoch_ = 0;
51 bool playback_epoch_exhausted_ = false;
52 std::uint64_t loop_pass_index_ = 0;
53 double previous_host_loop_start_beats_ = 0.0;
54 double previous_host_loop_end_beats_ = 0.0;
55 bool previous_has_precise_host_loop_ = false;
56 bool has_expected_sample_ = false;
57 bool first_block_ = true;
58 bool previous_playing_ = false;
59 bool previous_host_beat_mapping_ = false;
60 bool pending_discontinuity_ = false;
61};
62
63} // namespace pulp::sequence
Re-anchors the engine transport to the host's integer sample position on every callback.
Definition host_transport_projector.hpp:32
HostTransportProjectionError project(const format::ProcessContext &context, playback::TransportSnapshot &snapshot) noexcept
HostTransportProjectionError prepare(const timebase::CompiledTempoMap &tempo_map, std::uint32_t maximum_block_size) noexcept
Definition compiled_tempo_map.hpp:91
timebase::LoopRegion LoopRegion
The loop is a pair of document positions, so the timebase owns it and every rung that describes a loo...
Definition transport.hpp:43
timebase::MeterSignature MeterSignature
Definition transport.hpp:39
Definition host_transport_projector.hpp:23
HostTransportProjectionError advance_host_playback_epoch(std::uint64_t &epoch) noexcept
Advances a host-projected playback epoch without wrapping its identity.
Definition host_transport_projector.hpp:8
HostTransportProjectionError
Definition host_transport_projector.hpp:10
@ NotPrepared
Definition host_transport_projector.hpp:12
@ InvalidLoop
Definition host_transport_projector.hpp:16
@ None
Definition host_transport_projector.hpp:11
@ InvalidSampleRate
Definition host_transport_projector.hpp:14
@ BeatPositionOutOfRange
Definition host_transport_projector.hpp:19
@ InvalidFrameCount
Definition host_transport_projector.hpp:13
@ InvalidMeter
Definition host_transport_projector.hpp:15
@ LoopTooShortForBlock
Definition host_transport_projector.hpp:17
@ InvalidHostBeatClock
Definition host_transport_projector.hpp:18
@ PlaybackEpochExhausted
Definition host_transport_projector.hpp:20
Definition beat_division.hpp:11
STL namespace.
Process context — passed every audio callback with transport state.
Definition process_context.hpp:89
Definition transport.hpp:71
Definition rational_time.hpp:9