|
Ardour
9.0-pre0-1950-g391fe97693
|
#include <port_manager.h>
Classes | |
| struct | AudioInputPort |
| struct | DPM |
| struct | MIDIInputPort |
| struct | MPM |
| struct | PortID |
| struct | PortMetaData |
| class | PortRegistrationFailure |
| struct | SortByPortName |
Public Types | |
| typedef std::map< std::string, std::shared_ptr< Port >, SortByPortName > | Ports |
| typedef std::list< std::shared_ptr< Port > > | PortList |
| typedef std::shared_ptr< CircularSampleBuffer > | AudioPortScope |
| typedef std::shared_ptr< CircularEventBuffer > | MIDIPortMonitor |
| typedef std::shared_ptr< DPM > | AudioPortMeter |
| typedef std::shared_ptr< MPM > | MIDIPortMeter |
| typedef std::map< std::string, AudioInputPort, SortByPortName > | AudioInputPorts |
| typedef std::map< std::string, MIDIInputPort, SortByPortName > | MIDIInputPorts |
Public Member Functions | |
| PortManager () | |
| virtual | ~PortManager () |
| PortEngine & | port_engine () |
| uint32_t | port_name_size () const |
| std::string | my_name () const |
| size_t | total_port_count () const |
| size_t | session_port_count () const |
| void | list_cycle_ports () const |
| void | list_all_ports () const |
| std::shared_ptr< Port > | register_input_port (DataType, const std::string &portname, bool async=false, PortFlags extra_flags=PortFlags(0)) |
| std::shared_ptr< Port > | register_output_port (DataType, const std::string &portname, bool async=false, PortFlags extra_flags=PortFlags(0)) |
| int | unregister_port (std::shared_ptr< Port >) |
| int | connect (const std::string &source, const std::string &destination) |
| int | disconnect (const std::string &source, const std::string &destination) |
| int | disconnect (std::shared_ptr< Port >) |
| int | disconnect (std::string const &) |
| int | reestablish_ports () |
| int | reconnect_ports (Session *s=nullptr) |
| bool | connected (const std::string &) |
| bool | physically_connected (const std::string &) |
| int | get_connections (const std::string &, std::vector< std::string > &, bool process_context_safe=true) |
| std::shared_ptr< Port > | get_port_by_name (const std::string &) |
| void | port_renamed (const std::string &, const std::string &) |
| std::string | make_port_name_relative (const std::string &name) const |
| std::string | make_port_name_non_relative (const std::string &name) const |
| std::string | get_pretty_name_by_name (const std::string &portname) const |
| std::string | get_hardware_port_name_by_name (const std::string &portname) const |
| std::string | short_port_name_from_port_name (std::string const &full_name) const |
| bool | port_is_mine (const std::string &fullname) const |
| bool | port_is_physical (const std::string &) const |
| void | get_physical_outputs (DataType type, std::vector< std::string > &, MidiPortFlags include=MidiPortFlags(0), MidiPortFlags exclude=MidiPortFlags(0)) |
| void | get_physical_inputs (DataType type, std::vector< std::string > &, MidiPortFlags include=MidiPortFlags(0), MidiPortFlags exclude=MidiPortFlags(0)) |
| ChanCount | n_physical_outputs () const |
| ChanCount | n_physical_inputs () const |
| int | get_ports (const std::string &port_name_pattern, DataType type, PortFlags flags, std::vector< std::string > &) |
| int | get_ports (DataType, PortList &) |
| void | set_port_pretty_name (std::string const &, std::string const &) |
| void | remove_session_ports () |
| void | reinit (bool with_ratio=false) |
| void | clear_pending_port_deletions () |
| virtual void | add_pending_port_deletion (Port *)=0 |
| PBD::RingBuffer< Port * > & | port_deletions_pending () |
| bool | check_for_ambiguous_latency (bool log=false) const |
| bool | can_request_input_monitoring () const |
| void | request_input_monitoring (const std::string &, bool) const |
| void | ensure_input_monitoring (const std::string &, bool) const |
| void | registration_callback () |
| int | graph_order_callback () |
| void | connect_callback (const std::string &, const std::string &, bool connection) |
| bool | port_remove_in_progress () const |
| MidiPortFlags | midi_port_metadata (std::string const &) |
| void | get_configurable_midi_ports (std::vector< std::string > &, bool for_input) |
| void | get_midi_selection_ports (std::vector< std::string > &) |
| void | add_midi_port_flags (std::string const &, MidiPortFlags) |
| void | remove_midi_port_flags (std::string const &, MidiPortFlags) |
| void | reset_input_meters () |
| AudioInputPorts | audio_input_ports () const |
| MIDIInputPorts | midi_input_ports () const |
| MonitorPort & | monitor_port () |
Static Public Member Functions | |
| static void | falloff_cache_calc (pframes_t, samplecnt_t) |
| static bool | port_is_virtual_piano (std::string const &) |
| static bool | port_is_control_only (std::string const &) |
| static bool | port_is_physical_input_monitor_enable (std::string const &) |
Public Attributes | |
| PBD::Signal< void()> | MidiSelectionPortsChanged |
| PBD::Signal< void()> | MidiPortInfoChanged |
| PBD::Signal< void(std::string)> | PortPrettyNameChanged |
| PBD::Signal< void()> | GraphReordered |
| PBD::Signal< void()> | PortRegisteredOrUnregistered |
| PBD::Signal< void(std::weak_ptr< Port >, std::string, std::weak_ptr< Port >, std::string, bool)> | PortConnectedOrDisconnected |
| PBD::Signal< void(DataType, std::vector< std::string >, bool)> | PhysInputChanged |
Protected Member Functions | |
| std::shared_ptr< Port > | register_port (DataType type, const std::string &portname, bool input, bool async=false, PortFlags extra_flags=PortFlags(0)) |
| void | port_registration_failure (const std::string &portname) |
| void | silence (pframes_t nframes, Session *s=0) |
| void | silence_outputs (pframes_t nframes) |
| void | check_monitoring () |
| void | cycle_start (pframes_t nframes, Session *s=0) |
| void | cycle_end (pframes_t nframes, Session *s=0) |
| void | cycle_end_fade_out (gain_t, gain_t, pframes_t, Session *s=0) |
| void | filter_midi_ports (std::vector< std::string > &, MidiPortFlags, MidiPortFlags) |
| void | set_port_buffer_sizes (pframes_t) |
Static Protected Member Functions | |
| static std::string | port_info_file () |
| static std::string | midi_port_info_file () |
Protected Attributes | |
| std::shared_ptr< AudioBackend > | _backend |
| SerializedRCUManager< Ports > | _ports |
| bool | _port_remove_in_progress |
| PBD::RingBuffer< Port * > | _port_deletions_pending |
| std::shared_ptr< Ports const > | _cycle_ports |
Private Types | |
| typedef std::map< PortID, PortMetaData > | PortInfo |
Private Member Functions | |
| void | run_input_meters (pframes_t, samplecnt_t) |
| void | set_pretty_names (std::vector< std::string > const &, DataType, bool) |
| void | fill_midi_port_info_locked () |
| void | load_port_info () |
| void | save_port_info () |
| void | update_input_ports (bool) |
Private Attributes | |
| MonitorPort | _monitor_port |
| Glib::Threads::Mutex | _port_info_mutex |
| PortInfo | _port_info |
| bool | _midi_info_dirty |
| SerializedRCUManager< AudioInputPorts > | _audio_input_ports |
| SerializedRCUManager< MIDIInputPorts > | _midi_input_ports |
| std::atomic< int > | _reset_meters |
Definition at line 48 of file port_manager.h.
| typedef std::map<std::string, AudioInputPort, SortByPortName> ARDOUR::PortManager::AudioInputPorts |
Definition at line 115 of file port_manager.h.
| typedef std::shared_ptr<DPM> ARDOUR::PortManager::AudioPortMeter |
Definition at line 95 of file port_manager.h.
| typedef std::shared_ptr<CircularSampleBuffer> ARDOUR::PortManager::AudioPortScope |
Definition at line 93 of file port_manager.h.
| typedef std::map<std::string, MIDIInputPort, SortByPortName> ARDOUR::PortManager::MIDIInputPorts |
Definition at line 116 of file port_manager.h.
| typedef std::shared_ptr<MPM> ARDOUR::PortManager::MIDIPortMeter |
Definition at line 96 of file port_manager.h.
| typedef std::shared_ptr<CircularEventBuffer> ARDOUR::PortManager::MIDIPortMonitor |
Definition at line 94 of file port_manager.h.
|
private |
Definition at line 382 of file port_manager.h.
| typedef std::list<std::shared_ptr<Port> > ARDOUR::PortManager::PortList |
Definition at line 91 of file port_manager.h.
| typedef std::map<std::string, std::shared_ptr<Port>, SortByPortName> ARDOUR::PortManager::Ports |
Definition at line 90 of file port_manager.h.
| ARDOUR::PortManager::PortManager | ( | ) |
|
inlinevirtual |
Definition at line 119 of file port_manager.h.
| void ARDOUR::PortManager::add_midi_port_flags | ( | std::string const & | , |
| MidiPortFlags | |||
| ) |
|
pure virtual |
Implemented in ARDOUR::AudioEngine.
| AudioInputPorts ARDOUR::PortManager::audio_input_ports | ( | ) | const |
| bool ARDOUR::PortManager::can_request_input_monitoring | ( | ) | const |
| bool ARDOUR::PortManager::check_for_ambiguous_latency | ( | bool | log = false | ) | const |
|
protected |
| void ARDOUR::PortManager::clear_pending_port_deletions | ( | ) |
| int ARDOUR::PortManager::connect | ( | const std::string & | source, |
| const std::string & | destination | ||
| ) |
| void ARDOUR::PortManager::connect_callback | ( | const std::string & | , |
| const std::string & | , | ||
| bool | connection | ||
| ) |
| bool ARDOUR::PortManager::connected | ( | const std::string & | ) |
Signal the end of an audio cycle. This signifies that the cycle began with cycle_start has ended. This MUST be called at the end of each cycle. Realtime safe.
|
protected |
Signal the start of an audio cycle. This MUST be called before any reading/writing for this cycle. Realtime safe.
| int ARDOUR::PortManager::disconnect | ( | const std::string & | source, |
| const std::string & | destination | ||
| ) |
| int ARDOUR::PortManager::disconnect | ( | std::shared_ptr< Port > | ) |
| int ARDOUR::PortManager::disconnect | ( | std::string const & | ) |
| void ARDOUR::PortManager::ensure_input_monitoring | ( | const std::string & | , |
| bool | |||
| ) | const |
|
static |
|
private |
|
protected |
| void ARDOUR::PortManager::get_configurable_midi_ports | ( | std::vector< std::string > & | , |
| bool | for_input | ||
| ) |
| int ARDOUR::PortManager::get_connections | ( | const std::string & | , |
| std::vector< std::string > & | , | ||
| bool | process_context_safe = true |
||
| ) |
| std::string ARDOUR::PortManager::get_hardware_port_name_by_name | ( | const std::string & | portname | ) | const |
| void ARDOUR::PortManager::get_midi_selection_ports | ( | std::vector< std::string > & | ) |
| void ARDOUR::PortManager::get_physical_inputs | ( | DataType | type, |
| std::vector< std::string > & | , | ||
| MidiPortFlags | include = MidiPortFlags(0), |
||
| MidiPortFlags | exclude = MidiPortFlags(0) |
||
| ) |
| void ARDOUR::PortManager::get_physical_outputs | ( | DataType | type, |
| std::vector< std::string > & | , | ||
| MidiPortFlags | include = MidiPortFlags(0), |
||
| MidiPortFlags | exclude = MidiPortFlags(0) |
||
| ) |
| std::shared_ptr<Port> ARDOUR::PortManager::get_port_by_name | ( | const std::string & | ) |
| int ARDOUR::PortManager::get_ports | ( | const std::string & | port_name_pattern, |
| DataType | type, | ||
| PortFlags | flags, | ||
| std::vector< std::string > & | |||
| ) |
| std::string ARDOUR::PortManager::get_pretty_name_by_name | ( | const std::string & | portname | ) | const |
| int ARDOUR::PortManager::graph_order_callback | ( | ) |
| void ARDOUR::PortManager::list_all_ports | ( | ) | const |
| void ARDOUR::PortManager::list_cycle_ports | ( | ) | const |
|
private |
| std::string ARDOUR::PortManager::make_port_name_non_relative | ( | const std::string & | name | ) | const |
| std::string ARDOUR::PortManager::make_port_name_relative | ( | const std::string & | name | ) | const |
| MIDIInputPorts ARDOUR::PortManager::midi_input_ports | ( | ) | const |
|
staticprotected |
| MidiPortFlags ARDOUR::PortManager::midi_port_metadata | ( | std::string const & | ) |
|
inline |
Definition at line 273 of file port_manager.h.
| std::string ARDOUR::PortManager::my_name | ( | ) | const |
| ChanCount ARDOUR::PortManager::n_physical_inputs | ( | ) | const |
| ChanCount ARDOUR::PortManager::n_physical_outputs | ( | ) | const |
| bool ARDOUR::PortManager::physically_connected | ( | const std::string & | ) |
|
inline |
Definition at line 197 of file port_manager.h.
| PortEngine& ARDOUR::PortManager::port_engine | ( | ) |
|
staticprotected |
|
static |
| bool ARDOUR::PortManager::port_is_mine | ( | const std::string & | fullname | ) | const |
| bool ARDOUR::PortManager::port_is_physical | ( | const std::string & | ) | const |
|
static |
|
static |
| uint32_t ARDOUR::PortManager::port_name_size | ( | ) | const |
|
protected |
|
inline |
Definition at line 233 of file port_manager.h.
| void ARDOUR::PortManager::port_renamed | ( | const std::string & | , |
| const std::string & | |||
| ) |
| int ARDOUR::PortManager::reconnect_ports | ( | Session * | s = nullptr | ) |
| int ARDOUR::PortManager::reestablish_ports | ( | ) |
| std::shared_ptr<Port> ARDOUR::PortManager::register_input_port | ( | DataType | , |
| const std::string & | portname, | ||
| bool | async = false, |
||
| PortFlags | extra_flags = PortFlags(0) |
||
| ) |
| std::shared_ptr<Port> ARDOUR::PortManager::register_output_port | ( | DataType | , |
| const std::string & | portname, | ||
| bool | async = false, |
||
| PortFlags | extra_flags = PortFlags(0) |
||
| ) |
|
protected |
| void ARDOUR::PortManager::registration_callback | ( | ) |
| void ARDOUR::PortManager::reinit | ( | bool | with_ratio = false | ) |
reset port-buffers. e.g. after freewheeling
| void ARDOUR::PortManager::remove_midi_port_flags | ( | std::string const & | , |
| MidiPortFlags | |||
| ) |
| void ARDOUR::PortManager::remove_session_ports | ( | ) |
| void ARDOUR::PortManager::request_input_monitoring | ( | const std::string & | , |
| bool | |||
| ) | const |
| void ARDOUR::PortManager::reset_input_meters | ( | ) |
|
private |
|
private |
| size_t ARDOUR::PortManager::session_port_count | ( | ) | const |
|
protected |
| void ARDOUR::PortManager::set_port_pretty_name | ( | std::string const & | , |
| std::string const & | |||
| ) |
|
private |
| std::string ARDOUR::PortManager::short_port_name_from_port_name | ( | std::string const & | full_name | ) | const |
|
protected |
|
inline |
Definition at line 128 of file port_manager.h.
| int ARDOUR::PortManager::unregister_port | ( | std::shared_ptr< Port > | ) |
|
private |
|
private |
Definition at line 388 of file port_manager.h.
|
protected |
Definition at line 278 of file port_manager.h.
|
protected |
List of ports to be used between cycle_start() and cycle_end()
Definition at line 289 of file port_manager.h.
|
private |
Definition at line 386 of file port_manager.h.
|
private |
Definition at line 389 of file port_manager.h.
|
private |
Definition at line 324 of file port_manager.h.
|
protected |
Definition at line 283 of file port_manager.h.
|
private |
Definition at line 385 of file port_manager.h.
|
mutableprivate |
Definition at line 384 of file port_manager.h.
|
protected |
Definition at line 282 of file port_manager.h.
|
protected |
Definition at line 280 of file port_manager.h.
|
private |
Definition at line 390 of file port_manager.h.
| PBD::Signal<void()> ARDOUR::PortManager::GraphReordered |
Emitted if the backend notifies us of a graph order event
Definition at line 253 of file port_manager.h.
| PBD::Signal<void()> ARDOUR::PortManager::MidiPortInfoChanged |
Emitted if anything other than the selection property for a MIDI port changes
Definition at line 248 of file port_manager.h.
| PBD::Signal<void()> ARDOUR::PortManager::MidiSelectionPortsChanged |
Emitted if the list of ports to be used for MIDI selection tracking changes
Definition at line 246 of file port_manager.h.
| PBD::Signal<void(DataType, std::vector<std::string>, bool)> ARDOUR::PortManager::PhysInputChanged |
Definition at line 265 of file port_manager.h.
| PBD::Signal<void(std::weak_ptr<Port>, std::string, std::weak_ptr<Port>, std::string, bool)> ARDOUR::PortManager::PortConnectedOrDisconnected |
Emitted if a Port is connected or disconnected. The Port parameters are the ports being connected / disconnected, or 0 if they are not known to Ardour. The std::string parameters are the (long) port names. The bool parameter is true if ports were connected, or false for disconnected.
Definition at line 263 of file port_manager.h.
| PBD::Signal<void(std::string)> ARDOUR::PortManager::PortPrettyNameChanged |
Emitted if pretty-name of a port changed
Definition at line 250 of file port_manager.h.
| PBD::Signal<void()> ARDOUR::PortManager::PortRegisteredOrUnregistered |
Emitted if a Port is registered or unregistered
Definition at line 256 of file port_manager.h.