Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::gpu_audio::GpuNeuralCpuKernel Struct Reference

One channel's CPU model step, supplied and owned by the caller. More...

#include <gpu_neural_model.hpp>

Public Attributes

void * state = nullptr
bool(* prepare )(void *state) noexcept = nullptr
 Host thread, before processing starts: clear the causal state.
void(* process )(void *state, const float *input, float *output, std::uint32_t frames) noexcept = nullptr
 Runs on the audio thread (Inline shadow, CPU-only families) or on the shadow thread (Worker).
void(* reset )(void *state) noexcept = nullptr
 Restarts the causal state; called off the audio thread.

Detailed Description

One channel's CPU model step, supplied and owned by the caller.

The node keeps one kernel per audio channel and never shares state between them. state must stay valid, and its storage allocated, until the model and every node that bound it are destroyed.

Member Data Documentation

◆ prepare

bool(* pulp::gpu_audio::GpuNeuralCpuKernel::prepare) (void *state) noexcept = nullptr
noexcept

Host thread, before processing starts: clear the causal state.

Returning false refuses preparation.

◆ process

void(* pulp::gpu_audio::GpuNeuralCpuKernel::process) (void *state, const float *input, float *output, std::uint32_t frames) noexcept = nullptr
noexcept

Runs on the audio thread (Inline shadow, CPU-only families) or on the shadow thread (Worker).

It must not allocate, lock or block. Input is always finite: the node replaces NaN and infinities with zero first.

◆ reset

void(* pulp::gpu_audio::GpuNeuralCpuKernel::reset) (void *state) noexcept = nullptr
noexcept

Restarts the causal state; called off the audio thread.

◆ state

void* pulp::gpu_audio::GpuNeuralCpuKernel::state = nullptr

The documentation for this struct was generated from the following file: