Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
loop_reader.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4
8
9namespace pulp::audio {
10
12public:
15 static std::uint64_t source_frame_for_tap(const LoopRegion& region,
16 std::uint64_t source_frames,
17 std::int64_t signed_frame) noexcept;
18
19 static double normalize_position(const LoopRegion& region,
20 double position) noexcept;
21
22 static float read(BufferView<const float> source,
23 const LoopRegion& region,
24 std::uint32_t output_channel,
25 double position) noexcept;
26
27 static float read(BufferView<const float> source,
28 const LoopRegion& region,
29 std::uint32_t output_channel,
30 double position,
31 SampleInterpolationPolicy interpolation) noexcept;
32
33 static float read(BufferView<const float> source,
34 const LoopRegion& region,
35 std::uint32_t output_channel,
36 double position,
37 const PreparedSampleInterpolation& interpolation) noexcept;
38
39 // Fast path for renderers that already validated `region` against the
40 // source length for the current block. Public `read()` remains the safe
41 // guard rail for arbitrary callers.
43 const LoopRegion& region,
44 std::uint32_t output_channel,
45 double position) noexcept;
46
48 const LoopRegion& region,
49 std::uint32_t output_channel,
50 double position,
51 SampleInterpolationPolicy interpolation) noexcept;
52
53 static float read_validated(
55 const LoopRegion& region,
56 std::uint32_t output_channel,
57 double position,
58 const PreparedSampleInterpolation& interpolation) noexcept;
59};
60
61} // namespace pulp::audio
Non-owning view over multi-channel audio sample data.
Definition buffer.hpp:30
Definition loop_reader.hpp:11
static float read_validated(BufferView< const float > source, const LoopRegion &region, std::uint32_t output_channel, double position, SampleInterpolationPolicy interpolation) noexcept
static double normalize_position(const LoopRegion &region, double position) noexcept
static std::uint64_t source_frame_for_tap(const LoopRegion &region, std::uint64_t source_frames, std::int64_t signed_frame) noexcept
Resolves an interpolation tap according to the traversal boundary: bounded modes clamp,...
static float read(BufferView< const float > source, const LoopRegion &region, std::uint32_t output_channel, double position, const PreparedSampleInterpolation &interpolation) noexcept
static float read_validated(BufferView< const float > source, const LoopRegion &region, std::uint32_t output_channel, double position) noexcept
static float read(BufferView< const float > source, const LoopRegion &region, std::uint32_t output_channel, double position) noexcept
static float read_validated(BufferView< const float > source, const LoopRegion &region, std::uint32_t output_channel, double position, const PreparedSampleInterpolation &interpolation) noexcept
static float read(BufferView< const float > source, const LoopRegion &region, std::uint32_t output_channel, double position, SampleInterpolationPolicy interpolation) noexcept
Definition analyzer_provider.hpp:12
SampleInterpolationPolicy
Definition sample_interpolation.hpp:21
Definition loop_types.hpp:42
Definition sample_interpolation.hpp:148