Audio port specifics.
More...
#include <src/gui/dsp/audio_port.h>
|
| AudioPort (utils::Utf8String label, PortFlow flow) |
bool | has_sound () const override |
| If MIDI port, returns if there are any events, if audio port, returns if there is sound in the buffer.
|
void | apply_fader (float amp, nframes_t start_frame, nframes_t nframes) |
| Applies the fader to the audio buffer.
|
void | apply_pan (float pan, zrythm::dsp::PanLaw pan_law, zrythm::dsp::PanAlgorithm pan_algo, nframes_t start_frame, nframes_t nframes) |
| Applies the pan to the audio buffer.
|
float | get_peak () const |
| Returns the peak amplitude of the audio buffer.
|
void | reset_peak () |
| Resets the peak amplitude to 0.
|
void | process_block (EngineProcessTimeInfo time_nfo) override |
void | clear_buffer (std::size_t block_length) override |
| Clears the port buffer.
|
bool | is_stereo_port () const |
void | init_loaded (IPortOwner &owner) |
| This function finds the Ports corresponding to the PortIdentifiers for srcs and dests.
|
void | set_owner (IPortOwner &owner) |
utils::Utf8String | get_label () const |
bool | is_control () const |
bool | is_audio () const |
bool | is_cv () const |
bool | is_event () const |
bool | is_midi () const |
bool | is_input () const |
bool | is_output () const |
utils::Utf8String | get_node_name () const override |
| Returns a human friendly name of the node.
|
nframes_t | get_single_playback_latency () const override |
| Ports have no latency.
|
utils::Utf8String | get_full_designation () const |
| Gets a full designation of the port in the format "Track/Port" or "Track/Plugin/Port".
|
void | change_track (IPortOwner::TrackUuid new_track_id) |
| Updates the owner track identifier.
|
bool | has_label () const |
PortType | get_type () const |
PortFlow | get_flow () const |
UuidIdentifiableObject & | operator= (const UuidIdentifiableObject &other)=default |
auto | get_uuid () const |
Public Member Functions inherited from AudioAndCVPortMixin |
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().
|
Audio port specifics.
Definition at line 20 of file audio_port.h.
◆ apply_fader()
Applies the fader to the audio buffer.
- Parameters
-
amp | The fader amplitude (0.0 to 1.0). |
start_frame | The start frame offset from 0 in this cycle. |
nframes | The number of frames to process. |
◆ apply_pan()
void AudioPort::apply_pan |
( |
float | pan, |
|
|
zrythm::dsp::PanLaw | pan_law, |
|
|
zrythm::dsp::PanAlgorithm | pan_algo, |
|
|
nframes_t | start_frame, |
|
|
nframes_t | nframes ) |
Applies the pan to the audio buffer.
- Parameters
-
pan | The pan value (-1.0 to 1.0). |
pan_law | The pan law to use. |
pan_algo | The pan algorithm to use. |
start_frame | The start frame offset from 0 in this cycle. |
nframes | The number of frames to process. |
◆ clear_buffer()
void AudioPort::clear_buffer |
( |
std::size_t | block_length | ) |
|
|
overridevirtual |
Clears the port buffer.
Implements Port.
◆ get_peak()
float AudioPort::get_peak |
( |
| ) |
const |
|
inline |
Returns the peak amplitude of the audio buffer.
- Returns
- The peak amplitude (0.0 to 1.0).
Definition at line 70 of file audio_port.h.
◆ has_sound()
bool AudioPort::has_sound |
( |
| ) |
const |
|
overridevirtual |
If MIDI port, returns if there are any events, if audio port, returns if there is sound in the buffer.
Reimplemented from Port.
◆ is_stereo_port()
bool AudioPort::is_stereo_port |
( |
| ) |
const |
|
inline |
◆ process_block()
◆ reset_peak()
void AudioPort::reset_peak |
( |
| ) |
|
|
inline |
Resets the peak amplitude to 0.
Definition at line 75 of file audio_port.h.
◆ from_json
void from_json |
( |
const nlohmann::json & | j, |
|
|
AudioPort & | port ) |
|
friend |
◆ to_json
void to_json |
( |
nlohmann::json & | j, |
|
|
const AudioPort & | port ) |
|
friend |
◆ AUDIO_RING_SIZE
size_t AudioPort::AUDIO_RING_SIZE = 65536 |
|
staticconstexpr |
The documentation for this class was generated from the following file: