Fixes to get legacy 2.x sends working.
[ardour.git] / libs / ardour / ardour / audioengine.h
index 34f7eb8c22d083fa1d2ef3f1bb1b49e9131c87ff..e1d5e50cc22f96a73190fde0d34f45f6f071639f 100644 (file)
@@ -106,7 +106,13 @@ class AudioEngine : public sigc::trackable
 
        class PortRegistrationFailure : public std::exception {
          public:
-               virtual const char *what() const throw() { return "failed port registration"; }
+               PortRegistrationFailure (const char* why = "") {
+                       reason = why;
+               }
+               virtual const char *what() const throw() { return reason; }
+
+         private:
+               const char* reason;
        };
 
        class NoBackendAvailable : public std::exception {
@@ -114,8 +120,8 @@ class AudioEngine : public sigc::trackable
                virtual const char *what() const throw() { return "could not connect to engine backend"; }
        };
 
-       Port *register_input_port (PortType, DataType, const std::string& portname);
-       Port *register_output_port (PortType, DataType, const std::string& portname);
+       Port *register_input_port (DataType, const std::string& portname, bool publish);
+       Port *register_output_port (DataType, const std::string& portname, bool publish);
        int   unregister_port (Port &);
        
        int connect (const std::string& source, const std::string& destination);
@@ -127,6 +133,8 @@ class AudioEngine : public sigc::trackable
        uint32_t n_physical_outputs () const;
        uint32_t n_physical_inputs () const;
 
+       bool can_request_hardware_monitoring ();
+
        void get_physical_outputs (std::vector<std::string>&);
        void get_physical_inputs (std::vector<std::string>&);
 
@@ -144,7 +152,7 @@ class AudioEngine : public sigc::trackable
 
        /** Caller may not delete the object pointed to by the return value
        */
-       Port *get_port_by_name (const std::string& name, bool keep = true);
+       Port *get_port_by_name (const std::string& name, bool keep = true) const;
 
        enum TransportState {
                TransportStopped = JackTransportStopped,
@@ -199,7 +207,7 @@ class AudioEngine : public sigc::trackable
        ARDOUR::Session *session;
        jack_client_t *_jack;
        std::string jack_client_name;
-       Glib::Mutex _process_lock;
+       mutable Glib::Mutex _process_lock;
        Glib::Cond session_removed;
        bool session_remove_pending;
        bool _running;
@@ -220,12 +228,12 @@ class AudioEngine : public sigc::trackable
 
        SerializedRCUManager<Ports> ports;
 
-       Port *register_port (PortType ptype, DataType type, const std::string& portname, bool input);
+       Port *register_port (DataType type, const std::string& portname, bool input, bool publish);
 
        int    process_callback (nframes_t nframes);
        void   remove_all_ports ();
 
-       InternalPort* get_internal_port (const std::string& short_name);
+       Port* get_port (const std::string& short_name);
 
        typedef std::pair<std::string,std::string> PortConnection;
        typedef std::list<PortConnection> PortConnections;
@@ -235,6 +243,8 @@ class AudioEngine : public sigc::trackable
 
        std::string get_nth_physical (DataType type, uint32_t n, int flags);
 
+       void port_registration_failure (const std::string& portname);
+
        static int  _xrun_callback (void *arg);
        static int  _graph_order_callback (void *arg);
        static int  _process_callback (nframes_t nframes, void *arg);