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

Public Member Functions

void prepare_for_processing (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 utils::Utf8String get_node_name () const =0
 Returns a human friendly name of the node.
virtual nframes_t get_single_playback_latency () const
 Returns the latency of only the given processable, without adding the previous/next latencies.
virtual void process_block (EngineProcessTimeInfo time_nfo)

Data Fields

std::vector< float > buf_
 Audio-like data buffer.
std::unique_ptr< RingBuffer< float > > audio_ring_
 Ring buffer for saving the contents of the audio buffer to be used in the UI instead of directly accessing the buffer.
Data Fields inherited from RingBufferOwningPortMixin
std::atomic< int > num_ring_buffer_readers_ { 0 }
 Number of entities that want ring buffers to be written.

Detailed Description

Definition at line 307 of file port.h.

Member Function Documentation

◆ prepare_for_processing()

void AudioAndCVPortMixin::prepare_for_processing ( sample_rate_t sample_rate,
nframes_t max_block_length )
inlinefinalvirtual

Called to allocate resources required for processing.

Parameters
sample_rate
max_block_length

Reimplemented from zrythm::dsp::graph::IProcessable.

Definition at line 315 of file port.h.

◆ release_resources()

void AudioAndCVPortMixin::release_resources ( )
inlinefinalvirtual

Called to release resources allocated by prepare_for_processing().

This may be called multiple times.

Reimplemented from zrythm::dsp::graph::IProcessable.

Definition at line 325 of file port.h.

Field Documentation

◆ audio_ring_

std::unique_ptr<RingBuffer<float> > AudioAndCVPortMixin::audio_ring_

Ring buffer for saving the contents of the audio buffer to be used in the UI instead of directly accessing the buffer.

This should contain blocks of block_length samples and should maintain at least 10 cycles' worth of buffers.

This is also used for CV.

Definition at line 346 of file port.h.

◆ buf_

std::vector<float> AudioAndCVPortMixin::buf_

Audio-like data buffer.

Definition at line 335 of file port.h.


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