From 29c484cd95afac615b9970b8392bc78db5928ff0 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 3 Oct 2015 12:37:13 -0400 Subject: NOOP: reformat indentation --- libs/ardour/ardour/port_manager.h | 214 +++++++++++++++++++------------------- 1 file changed, 107 insertions(+), 107 deletions(-) (limited to 'libs') diff --git a/libs/ardour/ardour/port_manager.h b/libs/ardour/ardour/port_manager.h index 390369fefd..e40c80c1b2 100644 --- a/libs/ardour/ardour/port_manager.h +++ b/libs/ardour/ardour/port_manager.h @@ -1,19 +1,19 @@ /* - Copyright (C) 2013 Paul Davis + Copyright (C) 2013 Paul Davis - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ @@ -43,127 +43,127 @@ class AudioBackend; class LIBARDOUR_API PortManager { public: - typedef std::map > Ports; - typedef std::list > PortList; + typedef std::map > Ports; + typedef std::list > PortList; - PortManager (); - virtual ~PortManager() {} + PortManager (); + virtual ~PortManager() {} - PortEngine& port_engine(); + PortEngine& port_engine(); - uint32_t port_name_size() const; - std::string my_name() const; + uint32_t port_name_size() const; + std::string my_name() const; - /* Port registration */ + /* Port registration */ - boost::shared_ptr register_input_port (DataType, const std::string& portname, bool async = false); - boost::shared_ptr register_output_port (DataType, const std::string& portname, bool async = false); - int unregister_port (boost::shared_ptr); + boost::shared_ptr register_input_port (DataType, const std::string& portname, bool async = false); + boost::shared_ptr register_output_port (DataType, const std::string& portname, bool async = false); + int unregister_port (boost::shared_ptr); - /* Port connectivity */ + /* Port connectivity */ - int connect (const std::string& source, const std::string& destination); - int disconnect (const std::string& source, const std::string& destination); - int disconnect (boost::shared_ptr); - int reestablish_ports (); - int reconnect_ports (); - - bool connected (const std::string&); - bool connected_to (const std::string&, const std::string&); - bool physically_connected (const std::string&); - int get_connections (const std::string&, std::vector&); - - /* Naming */ - - boost::shared_ptr 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; - bool port_is_mine (const std::string& fullname) const; - bool port_name_prefix_is_unique (const std::string& first_part_of_port_name) const; + int connect (const std::string& source, const std::string& destination); + int disconnect (const std::string& source, const std::string& destination); + int disconnect (boost::shared_ptr); + int reestablish_ports (); + int reconnect_ports (); + + bool connected (const std::string&); + bool connected_to (const std::string&, const std::string&); + bool physically_connected (const std::string&); + int get_connections (const std::string&, std::vector&); + + /* Naming */ + + boost::shared_ptr 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; + bool port_is_mine (const std::string& fullname) const; + bool port_name_prefix_is_unique (const std::string& first_part_of_port_name) const; - /* other Port management */ + /* other Port management */ - bool port_is_physical (const std::string&) const; - void get_physical_outputs (DataType type, std::vector&); - void get_physical_inputs (DataType type, std::vector&); - ChanCount n_physical_outputs () const; - ChanCount n_physical_inputs () const; + bool port_is_physical (const std::string&) const; + void get_physical_outputs (DataType type, std::vector&); + void get_physical_inputs (DataType type, std::vector&); + 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&); - int get_ports (DataType, PortList&); + int get_ports (const std::string& port_name_pattern, DataType type, PortFlags flags, std::vector&); + int get_ports (DataType, PortList&); - void remove_all_ports (); + void remove_all_ports (); - /* per-Port monitoring */ + /* per-Port monitoring */ - bool can_request_input_monitoring () const; - void request_input_monitoring (const std::string&, bool) const; - void ensure_input_monitoring (const std::string&, bool) 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; - class PortRegistrationFailure : public std::exception { - public: - PortRegistrationFailure (std::string const & why = "") - : reason (why) {} + class PortRegistrationFailure : public std::exception { + public: + PortRegistrationFailure (std::string const & why = "") + : reason (why) {} - ~PortRegistrationFailure () throw () {} + ~PortRegistrationFailure () throw () {} - const char *what() const throw () { return reason.c_str(); } + const char *what() const throw () { return reason.c_str(); } - private: - std::string reason; - }; + private: + std::string reason; + }; - /* the port engine will invoke these callbacks when the time is right */ + /* the port engine will invoke these callbacks when the time is right */ - void registration_callback (); - int graph_order_callback (); - void connect_callback (const std::string&, const std::string&, bool connection); + void registration_callback (); + int graph_order_callback (); + void connect_callback (const std::string&, const std::string&, bool connection); - bool port_remove_in_progress() const { return _port_remove_in_progress; } + bool port_remove_in_progress() const { return _port_remove_in_progress; } - /** Emitted if the backend notifies us of a graph order event */ - PBD::Signal0 GraphReordered; + /** Emitted if the backend notifies us of a graph order event */ + PBD::Signal0 GraphReordered; - /** Emitted if a Port is registered or unregistered */ - PBD::Signal0 PortRegisteredOrUnregistered; + /** Emitted if a Port is registered or unregistered */ + PBD::Signal0 PortRegisteredOrUnregistered; - /** 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. - */ - PBD::Signal5, std::string, boost::weak_ptr, std::string, bool> 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. + */ + PBD::Signal5, std::string, boost::weak_ptr, std::string, bool> PortConnectedOrDisconnected; protected: - boost::shared_ptr _backend; - SerializedRCUManager ports; - bool _port_remove_in_progress; - - boost::shared_ptr register_port (DataType type, const std::string& portname, bool input, bool async = false); - void port_registration_failure (const std::string& portname); - - /** List of ports to be used between ::cycle_start() and ::cycle_end() - */ - boost::shared_ptr _cycle_ports; - - void fade_out (gain_t, gain_t, pframes_t); - void silence (pframes_t nframes); - void silence_outputs (pframes_t nframes); - void check_monitoring (); - /** Signal the start of an audio cycle. - * This MUST be called before any reading/writing for this cycle. - * Realtime safe. - */ - void cycle_start (pframes_t nframes); + boost::shared_ptr _backend; + SerializedRCUManager ports; + bool _port_remove_in_progress; + + boost::shared_ptr register_port (DataType type, const std::string& portname, bool input, bool async = false); + void port_registration_failure (const std::string& portname); + + /** List of ports to be used between ::cycle_start() and ::cycle_end() + */ + boost::shared_ptr _cycle_ports; + + void fade_out (gain_t, gain_t, pframes_t); + void silence (pframes_t nframes); + void silence_outputs (pframes_t nframes); + void check_monitoring (); + /** Signal the start of an audio cycle. + * This MUST be called before any reading/writing for this cycle. + * Realtime safe. + */ + void cycle_start (pframes_t nframes); - /** Signal the end of an audio cycle. - * This signifies that the cycle began with @ref cycle_start has ended. - * This MUST be called at the end of each cycle. - * Realtime safe. - */ - void cycle_end (pframes_t nframes); + /** Signal the end of an audio cycle. + * This signifies that the cycle began with @ref cycle_start has ended. + * This MUST be called at the end of each cycle. + * Realtime safe. + */ + void cycle_end (pframes_t nframes); }; -- cgit v1.2.3