A unit of audio work the transport schedules onto a non-real-time worker. More...
#include <gpu_audio_node.hpp>
Public Member Functions | |
| virtual | ~GpuAudioNode ()=default |
| virtual GpuAudioNodeDescriptor | descriptor () const =0 |
| virtual bool | prepare ()=0 |
| Non-RT. Allocate/compile/upload static data here. | |
| virtual bool | cpu_fallback_prepared () const noexcept |
| Host-thread witness that the realtime CPU fallback is already built before prepare() returns. | |
| virtual void | process_block (const audio::BufferView< const float > &input, audio::BufferView< float > &output, uint32_t n)=0 |
| Non-RT worker context. Process exactly one block (n == block_size). | |
| virtual void | prime_fallback (const audio::BufferView< const float > &, uint32_t) noexcept |
| RT-safe. | |
| virtual void | process_cpu_fallback (const audio::BufferView< const float > &input, audio::BufferView< float > &output, uint32_t n) noexcept |
| RT-safe fallback. | |
| virtual GpuAudioStatus | status_snapshot () const noexcept |
| Host/UI thread. | |
| virtual bool | release_bounded (std::uint64_t) noexcept |
| Host thread, audio stopped. | |
| virtual bool | bind_realtime_path (detail::RealtimeGpuNodeBinding &) noexcept |
| Private transport hook, not for node authors: a node that the GPU audio transport drives through a stamped realtime path describes that path here. | |
A unit of audio work the transport schedules onto a non-real-time worker.
Lifecycle:
|
virtualdefault |
|
inlinevirtualnoexcept |
Private transport hook, not for node authors: a node that the GPU audio transport drives through a stamped realtime path describes that path here.
Returns false for a node the transport drives through its staged worker path, which is the default.
Reimplemented in pulp::gpu_audio::GpuConvolver, pulp::gpu_audio::GpuNeuralRealtimeNode, and pulp::gpu_audio::GpuWaveNetRealtimeNode.
|
inlinevirtualnoexcept |
Host-thread witness that the realtime CPU fallback is already built before prepare() returns.
A descriptor's supports_cpu_fallback bit is only a declaration; the transport admits MissPolicy::CpuFallback after both the declaration and this prepared witness are true. Nodes with no verified fallback remain fail-closed and must use silence on a miss.
Reimplemented in pulp::gpu_audio::GpuConvolver, and pulp::gpu_audio::GpuNeuralRealtimeNode.
|
pure virtual |
|
pure virtual |
Non-RT. Allocate/compile/upload static data here.
Implemented in pulp::gpu_audio::GpuConvolver, pulp::gpu_audio::GpuMultiConvolver, pulp::gpu_audio::GpuNeuralRealtimeNode, and pulp::gpu_audio::GpuWaveNetRealtimeNode.
|
inlinevirtualnoexcept |
RT-safe.
Called by the transport on EVERY block (not just misses) for a CpuFallback node, BEFORE the output-ring read, so the node's CPU fallback can be kept continuously fed and its convolution history is always current the moment a miss makes it take over. A node whose fallback needs no live priming (the default) does nothing. MUST NOT allocate, lock, or block.
Reimplemented in pulp::gpu_audio::GpuConvolver.
|
pure virtual |
Non-RT worker context. Process exactly one block (n == block_size).
Implemented in pulp::gpu_audio::GpuConvolver, and pulp::gpu_audio::GpuMultiConvolver.
|
inlinevirtualnoexcept |
RT-safe fallback.
MUST NOT allocate, lock, or block — it runs on the audio thread for the CpuFallback miss policy (hence noexcept). The default copies the current dry input to the output. The transport's output is delayed by latency_blocks, so that dry block breaks the timeline; it is not a safe fallback. A CpuFallback node should override this with a primed, latency-aligned fallback, or declare Silence. When paired with prime_fallback(), this emits the latency-aligned block the continuously-fed fallback has already computed.
Reimplemented in pulp::gpu_audio::GpuConvolver, and pulp::gpu_audio::GpuMultiConvolver.
|
inlinevirtualnoexcept |
Host thread, audio stopped.
Release provider resources within budget_ns, returning false if teardown had to be abandoned to stay in budget. The default holds nothing to release.
Reimplemented in pulp::gpu_audio::GpuWaveNetRealtimeNode.
|
inlinevirtualnoexcept |
Host/UI thread.
Allocation-free health snapshot. The default reports an uninitialized provider; nodes that track their provider override it.
Reimplemented in pulp::gpu_audio::GpuConvolver, pulp::gpu_audio::GpuMultiConvolver, pulp::gpu_audio::GpuNeuralRealtimeNode, and pulp::gpu_audio::GpuWaveNetRealtimeNode.