33 const std::string& shader_path,
35 uint32_t workgroup_x = 256);
47 void on_attach(
const std::shared_ptr<Buffer>& buffer)
override;
48 void on_detach(
const std::shared_ptr<Buffer>& buffer)
override;
49 [[nodiscard]]
bool is_compatible_with(
const std::shared_ptr<Buffer>& buffer)
const override;
57 std::array<uint32_t, 3> calculate_dispatch_size(
const std::shared_ptr<VKBuffer>& buffer)
override;
68 void validate_shader();
69 void resize_block(uint32_t frames);
70 void process_block(
const std::shared_ptr<Buffer>& buffer);
71 void release(
const std::shared_ptr<Buffer>& buffer);
Concrete audio implementation of the Buffer interface for double-precision audio data.
bool is_native_f64() const
void on_attach(const std::shared_ptr< Buffer > &buffer) override
Called when this processor is attached to a buffer.
void processing_function(const std::shared_ptr< Buffer > &buffer) override
The core processing function that must be implemented by derived classes.
std::atomic< bool > m_attached
Set on attach, cleared on detach.
bool is_compatible_with(const std::shared_ptr< Buffer > &buffer) const override
Checks if this processor can handle the specified buffer type.
std::atomic< bool > m_holds_block
True while m_block is allocated and bound.
std::shared_ptr< VKBuffer > m_block
AudioComputeProcessor(const std::string &shader_path, bool native_f64, uint32_t workgroup_x=256)
void on_detach(const std::shared_ptr< Buffer > &buffer) override
Called when this processor is detached from a buffer.
std::atomic< bool > m_in_flight
Set while processing_function runs on the processing thread.
ComputeProcessor(const std::string &shader_path, uint32_t workgroup_x=256)
Construct processor with shader path.
Complete declarative description of a generated compute shader.