Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
sampler_looper_metrics.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4#include <cstddef>
5#include <cstdint>
6
7namespace pulp::audio {
8
12class SampleSlotBank;
13struct LoopRenderResult;
15struct SliceMap;
16
17enum class RealtimeSampleRecorderState : std::uint8_t;
18enum class SampleSlotState : std::uint8_t;
19
21 std::uint64_t stream_underrun_frames = 0;
22 std::uint64_t stream_overrun_frames = 0;
24 std::uint64_t stream_queued_source_frames = 0;
27
28 std::uint64_t capture_capacity_frames = 0;
29 std::uint64_t capture_allocated_bytes = 0;
30
32 std::uint64_t recorder_frames_recorded = 0;
34 std::uint64_t recorder_dropped_commands = 0;
35 std::uint64_t recorder_dropped_events = 0;
36
37 std::uint32_t slot_count = 0;
38 std::array<std::uint32_t, 6> slot_state_counts{};
40 std::uint32_t published_slot_index = 0;
41 std::uint64_t active_generation = 0;
42 std::uint64_t published_sample_frames = 0;
43 std::uint32_t published_sample_channels = 0;
45
46 std::uint64_t loop_rendered_frames = 0;
47 std::uint64_t loop_silent_frames = 0;
48 bool loop_active = false;
49 bool loop_wrapped = false;
51
52 std::size_t onset_count = 0;
53 std::size_t slice_count = 0;
54};
55
57
59 const AudioStreamHandoff* handoff = nullptr,
60 const RollingAudioCaptureBuffer* capture = nullptr,
61 const RealtimeSampleRecorder* recorder = nullptr,
62 const SampleSlotBank* slots = nullptr,
63 const LoopRenderResult* loop = nullptr,
64 const OnsetDetectionResult* onsets = nullptr,
65 const SliceMap* slices = nullptr) noexcept;
66
67} // namespace pulp::audio
Definition audio_stream_handoff.hpp:50
Definition realtime_sample_recorder.hpp:80
Definition rolling_audio_capture_buffer.hpp:75
Definition sample_slot_bank.hpp:37
Definition analyzer_provider.hpp:12
SampleSlotState
Definition sample_slot_bank.hpp:13
RealtimeSampleRecorderState
Definition realtime_sample_recorder.hpp:14
std::size_t sample_slot_state_index(SampleSlotState state) noexcept
SamplerLooperMetricsSnapshot collect_sampler_looper_metrics(const AudioStreamHandoff *handoff=nullptr, const RollingAudioCaptureBuffer *capture=nullptr, const RealtimeSampleRecorder *recorder=nullptr, const SampleSlotBank *slots=nullptr, const LoopRenderResult *loop=nullptr, const OnsetDetectionResult *onsets=nullptr, const SliceMap *slices=nullptr) noexcept
SequencerStateChannel is the audio-safe transport for a plugin's structured NON-parameter state: the ...
Definition audio_device_manager.hpp:48
Definition loop_renderer.hpp:12
Definition onset_detector.hpp:33
Definition sampler_looper_metrics.hpp:20
double published_sample_rate
Definition sampler_looper_metrics.hpp:44
std::uint64_t capture_capacity_frames
Definition sampler_looper_metrics.hpp:28
float loop_max_sample_delta
Definition sampler_looper_metrics.hpp:50
std::uint64_t loop_silent_frames
Definition sampler_looper_metrics.hpp:47
std::uint32_t published_sample_channels
Definition sampler_looper_metrics.hpp:43
std::size_t slice_count
Definition sampler_looper_metrics.hpp:53
std::uint64_t recorder_dropped_events
Definition sampler_looper_metrics.hpp:35
std::uint64_t stream_overrun_frames
Definition sampler_looper_metrics.hpp:22
std::size_t onset_count
Definition sampler_looper_metrics.hpp:52
double stream_queued_source_seconds
Definition sampler_looper_metrics.hpp:25
bool loop_active
Definition sampler_looper_metrics.hpp:48
std::uint64_t recorder_total_recorded_frames
Definition sampler_looper_metrics.hpp:33
std::uint64_t recorder_dropped_commands
Definition sampler_looper_metrics.hpp:34
std::uint64_t published_sample_frames
Definition sampler_looper_metrics.hpp:42
std::uint64_t stream_queued_source_frames
Definition sampler_looper_metrics.hpp:24
std::array< std::uint32_t, 6 > slot_state_counts
Definition sampler_looper_metrics.hpp:38
std::uint64_t stream_underrun_frames
Definition sampler_looper_metrics.hpp:21
std::uint64_t stream_dropped_source_frames
Definition sampler_looper_metrics.hpp:23
double stream_estimated_latency_seconds
Definition sampler_looper_metrics.hpp:26
std::uint64_t loop_rendered_frames
Definition sampler_looper_metrics.hpp:46
std::uint64_t active_generation
Definition sampler_looper_metrics.hpp:41
bool published_sample_valid
Definition sampler_looper_metrics.hpp:39
bool loop_wrapped
Definition sampler_looper_metrics.hpp:49
std::uint32_t published_slot_index
Definition sampler_looper_metrics.hpp:40
RealtimeSampleRecorderState recorder_state
Definition sampler_looper_metrics.hpp:31
std::uint64_t recorder_frames_recorded
Definition sampler_looper_metrics.hpp:32
std::uint32_t slot_count
Definition sampler_looper_metrics.hpp:37
std::uint64_t capture_allocated_bytes
Definition sampler_looper_metrics.hpp:29
Definition slice_map.hpp:30