Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::dsp::AudioSampleProcessor Class Reference
Inheritance diagram for zrythm::dsp::AudioSampleProcessor:
Collaboration diagram for zrythm::dsp::AudioSampleProcessor:

Data Structures

struct  PlayableSampleSingleChannel
 A sample playback handle to be used by the engine. More...

Public Types

using QueueSingleChannelSampleCallback

Public Member Functions

 AudioSampleProcessor (dsp::ProcessorBase::ProcessorBaseDependencies dependencies)
void add_sample_to_process (PlayableSampleSingleChannel sample)
 Adds a sample to the queue.
void set_queue_sample_callback (QueueSingleChannelSampleCallback cb)
auto get_output_audio_port_non_rt () const
auto get_output_audio_port_rt () const
void custom_process_block (EngineProcessTimeInfo time_nfo, const dsp::ITransport &transport) noexcept override
 Custom processor logic after processing all owned parameters.
void custom_prepare_for_processing (const graph::GraphNode *node, units::sample_rate_t sample_rate, nframes_t max_block_length) override
void custom_release_resources () override
Public Member Functions inherited from zrythm::dsp::ProcessorBase
 ProcessorBase (ProcessorBaseDependencies dependencies, utils::Utf8String name={ u8"ProcessorBase" })
void set_name (const utils::Utf8String &name)
 Set a custom name to be used in the DSP graph.
void add_input_port (const dsp::PortUuidReference &uuid)
void add_output_port (const dsp::PortUuidReference &uuid)
void add_parameter (const dsp::ProcessorParameterUuidReference &uuid)
auto & get_input_ports () const
auto & get_output_ports () const
auto & get_parameters () const
utils::Utf8String get_node_name () const final
 Returns a human friendly name of the node.
void process_block (EngineProcessTimeInfo time_nfo, const dsp::ITransport &transport) noexcept final
 Calls custom_process_block() internally after processing all the parameters.
void prepare_for_processing (const graph::GraphNode *node, units::sample_rate_t sample_rate, nframes_t max_block_length) final
 Called to allocate resources required for processing.
void release_resources () final
 Called to release resources allocated by prepare_for_processing().
Public Member Functions inherited from zrythm::dsp::graph::IProcessable
virtual nframes_t get_single_playback_latency () const
 Returns the latency of only the given processable, without adding the previous/next latencies.

Additional Inherited Members

Protected Member Functions inherited from zrythm::dsp::ProcessorBase
auto dependencies () const

Detailed Description

Definition at line 17 of file audio_sample_processor.h.

Member Typedef Documentation

◆ QueueSingleChannelSampleCallback

using zrythm::dsp::AudioSampleProcessor::QueueSingleChannelSampleCallback
Initial value:
std::function<void (PlayableSampleSingleChannel)>
A sample playback handle to be used by the engine.

Definition at line 73 of file audio_sample_processor.h.

Constructor & Destructor Documentation

◆ AudioSampleProcessor()

zrythm::dsp::AudioSampleProcessor::AudioSampleProcessor ( dsp::ProcessorBase::ProcessorBaseDependencies dependencies)
inline

Definition at line 20 of file audio_sample_processor.h.

Member Function Documentation

◆ add_sample_to_process()

void zrythm::dsp::AudioSampleProcessor::add_sample_to_process ( PlayableSampleSingleChannel sample)
inline

Adds a sample to the queue.

Warning
This must only be called during the processing cycle before AudioSampleProcessor gets processed (eg, at the start of the processing cycle by the graph dispatcher, or in a node that is guaranteed to be processed before this). It is not thread-safe otherwise.

Definition at line 84 of file audio_sample_processor.h.

◆ custom_prepare_for_processing()

void zrythm::dsp::AudioSampleProcessor::custom_prepare_for_processing ( const graph::GraphNode * node,
units::sample_rate_t sample_rate,
nframes_t max_block_length )
inlineoverridevirtual

Reimplemented from zrythm::dsp::ProcessorBase.

Definition at line 175 of file audio_sample_processor.h.

◆ custom_process_block()

void zrythm::dsp::AudioSampleProcessor::custom_process_block ( EngineProcessTimeInfo time_nfo,
const dsp::ITransport & transport )
inlineoverridevirtualnoexcept

Custom processor logic after processing all owned parameters.

By default, this does passthrough to same-type ports.

Reimplemented from zrythm::dsp::ProcessorBase.

Reimplemented in zrythm::dsp::Metronome.

Definition at line 111 of file audio_sample_processor.h.

◆ custom_release_resources()

void zrythm::dsp::AudioSampleProcessor::custom_release_resources ( )
inlineoverridevirtual

Reimplemented from zrythm::dsp::ProcessorBase.

Definition at line 184 of file audio_sample_processor.h.

◆ get_output_audio_port_non_rt()

auto zrythm::dsp::AudioSampleProcessor::get_output_audio_port_non_rt ( ) const
inline

Definition at line 104 of file audio_sample_processor.h.

◆ get_output_audio_port_rt()

auto zrythm::dsp::AudioSampleProcessor::get_output_audio_port_rt ( ) const
inline

Definition at line 109 of file audio_sample_processor.h.

◆ set_queue_sample_callback()

void zrythm::dsp::AudioSampleProcessor::set_queue_sample_callback ( QueueSingleChannelSampleCallback cb)
inline

Definition at line 99 of file audio_sample_processor.h.


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