|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
Hardware processor. More...
#include <src/gui/dsp/hardware_processor.h>


Public Types | |
| using | PortFlow = zrythm::dsp::PortFlow |
Public Member Functions | |
| HardwareProcessor (bool input, AudioEngine *engine) | |
| void | init_loaded (AudioEngine *engine) |
| bool | is_in_active_project () const |
| void | rescan_ext_ports () |
| Rescans the hardware ports and appends any missing ones. | |
| ExtPort * | find_ext_port (const utils::Utf8String &id) |
| Finds an ext port from its ID (type + full name). | |
| template<typename T = Port> | |
| T * | find_port (const utils::Utf8String &id) |
| Finds a port from its ID (type + full name). | |
| void | setup () |
| Sets up the ports but does not start them. | |
| void | activate (bool activate) |
| Starts or stops the ports. | |
| void | process (nframes_t nframes) |
| Processes the data. | |
| utils::Utf8String | get_node_name () const override |
| Returns a human friendly name of the node. | |
| void | init_after_cloning (const HardwareProcessor &other, ObjectCloneType clone_type) override |
| To be used during serialization. | |
Public Member Functions inherited from ICloneable< HardwareProcessor > | |
| std::unique_ptr< HardwareProcessor > | clone_unique (ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const |
| std::shared_ptr< HardwareProcessor > | clone_shared (ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const |
| HardwareProcessor * | clone_raw_ptr (ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const |
| HardwareProcessor * | clone_qobject (QObject *parent, ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const |
| QScopedPointer< HardwareProcessor > | clone_unique_qobject (QObject *parent, ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const |
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. | |
| virtual void | process_block (EngineProcessTimeInfo time_nfo) |
| virtual void | clear_external_buffer (nframes_t block_length) |
| virtual bool | needs_external_buffer_clear_on_early_return () const |
Data Fields | |
| bool | is_input_ = false |
| Whether this is the processor at the start of the graph (input) or at the end (output). | |
| std::vector< utils::Utf8String > | selected_midi_ports_ |
| Ports selected by the user in the preferences to enable. | |
| std::vector< utils::Utf8String > | selected_audio_ports_ |
| std::vector< std::unique_ptr< ExtPort > > | ext_audio_ports_ |
| All known external ports. | |
| std::vector< std::unique_ptr< ExtPort > > | ext_midi_ports_ |
| std::vector< std::unique_ptr< AudioPort > > | audio_ports_ |
| Ports to be used by Zrythm, corresponding to the external ports. | |
| std::vector< std::unique_ptr< MidiPort > > | midi_ports_ |
| bool | setup_ = false |
| Whether set up already. | |
| bool | activated_ = false |
| Whether currently active. | |
| quint64 | rescan_timeout_id_ = 0 |
| AudioEngine * | engine_ = nullptr |
| Pointer to owner engine, if any. | |
Data Fields inherited from ICloneable< HardwareProcessor > | |
| friend | Derived |
Friends | |
| void | to_json (nlohmann::json &j, const HardwareProcessor &p) |
| void | from_json (const nlohmann::json &j, HardwareProcessor &p) |
Hardware processor.
Definition at line 23 of file hardware_processor.h.
| using HardwareProcessor::PortFlow = zrythm::dsp::PortFlow |
Definition at line 28 of file hardware_processor.h.
| void HardwareProcessor::activate | ( | bool | activate | ) |
Starts or stops the ports.
| activate | True to activate, false to deactivate |
| ExtPort * HardwareProcessor::find_ext_port | ( | const utils::Utf8String & | id | ) |
Finds an ext port from its ID (type + full name).
|
overridevirtual |
Returns a human friendly name of the node.
Implements zrythm::dsp::graph::IProcessable.
|
overridevirtual |
To be used during serialization.
Implements ICloneable< HardwareProcessor >.
| void HardwareProcessor::rescan_ext_ports | ( | ) |
Rescans the hardware ports and appends any missing ones.
|
friend |
Definition at line 93 of file hardware_processor.h.
| bool HardwareProcessor::activated_ = false |
Whether currently active.
Definition at line 142 of file hardware_processor.h.
| std::vector<std::unique_ptr<AudioPort> > HardwareProcessor::audio_ports_ |
Ports to be used by Zrythm, corresponding to the external ports.
Definition at line 135 of file hardware_processor.h.
| AudioEngine* HardwareProcessor::engine_ = nullptr |
Pointer to owner engine, if any.
Definition at line 147 of file hardware_processor.h.
| std::vector<std::unique_ptr<ExtPort> > HardwareProcessor::ext_audio_ports_ |
All known external ports.
Definition at line 129 of file hardware_processor.h.
| std::vector<std::unique_ptr<ExtPort> > HardwareProcessor::ext_midi_ports_ |
Definition at line 130 of file hardware_processor.h.
| bool HardwareProcessor::is_input_ = false |
Whether this is the processor at the start of the graph (input) or at the end (output).
Definition at line 114 of file hardware_processor.h.
| std::vector<std::unique_ptr<MidiPort> > HardwareProcessor::midi_ports_ |
Definition at line 136 of file hardware_processor.h.
| quint64 HardwareProcessor::rescan_timeout_id_ = 0 |
Definition at line 144 of file hardware_processor.h.
| std::vector<utils::Utf8String> HardwareProcessor::selected_audio_ports_ |
Definition at line 124 of file hardware_processor.h.
| std::vector<utils::Utf8String> HardwareProcessor::selected_midi_ports_ |
Ports selected by the user in the preferences to enable.
To be cached at startup (need restart for changes to take effect).
This is only for inputs.
Definition at line 123 of file hardware_processor.h.
| bool HardwareProcessor::setup_ = false |
Whether set up already.
Definition at line 139 of file hardware_processor.h.