export: add support for CAF
[ardour.git] / libs / ardour / ardour / port.h
index 15085ec47ba970c2caad3586a4fc882910f57ea4..e225117d940a90adde0d8e4c7bb19b134182ffce 100644 (file)
@@ -47,10 +47,10 @@ public:
 
        virtual ~Port ();
 
-       static void set_connecting_blocked( bool yn ) { 
+       static void set_connecting_blocked( bool yn ) {
                _connecting_blocked = yn;
        }
-       static bool connecting_blocked() { 
+       static bool connecting_blocked() {
                return _connecting_blocked;
        }
 
@@ -90,24 +90,24 @@ public:
        virtual int connect (Port *);
        int disconnect (Port *);
 
-       void ensure_monitor_input (bool);
-       bool monitoring_input () const;
+       void ensure_jack_monitors_input (bool);
+       bool jack_monitoring_input () const;
        int reestablish ();
        int reconnect ();
-       void request_monitor_input (bool);
-        
-        bool last_monitor() const { return _last_monitor; }
-        void set_last_monitor (bool yn) { _last_monitor = yn; }
+       void request_jack_monitors_input (bool);
 
-        jack_port_t* jack_port() const { return _jack_port; }
-        
-        void get_connected_latency_range (jack_latency_range_t& range, bool playback) const;
+       bool last_monitor() const { return _last_monitor; }
+       void set_last_monitor (bool yn) { _last_monitor = yn; }
 
-        void set_private_latency_range (jack_latency_range_t& range, bool playback);
-        const jack_latency_range_t&  private_latency_range (bool playback) const;
+       jack_port_t* jack_port() const { return _jack_port; }
 
-        void set_public_latency_range (jack_latency_range_t& range, bool playback) const;
-        jack_latency_range_t public_latency_range (bool playback) const;
+       void get_connected_latency_range (jack_latency_range_t& range, bool playback) const;
+
+       void set_private_latency_range (jack_latency_range_t& range, bool playback);
+       const jack_latency_range_t&  private_latency_range (bool playback) const;
+
+       void set_public_latency_range (jack_latency_range_t& range, bool playback) const;
+       jack_latency_range_t public_latency_range (bool playback) const;
 
        virtual void reset ();
 
@@ -116,19 +116,21 @@ public:
        virtual void cycle_end (pframes_t) = 0;
        virtual void cycle_split () = 0;
        virtual Buffer& get_buffer (pframes_t nframes) = 0;
-       virtual void flush_buffers (pframes_t /*nframes*/, framepos_t /*time*/) {}
+       virtual void flush_buffers (pframes_t /*nframes*/) {}
        virtual void transport_stopped () {}
+       virtual void realtime_locate () {}
 
-        bool physically_connected () const;
+       bool physically_connected () const;
 
        static void set_engine (AudioEngine *);
 
        PBD::Signal1<void,bool> MonitorInputChanged;
+       static PBD::Signal2<void,boost::shared_ptr<Port>,boost::shared_ptr<Port> > PostDisconnect;
+       static PBD::Signal0<void> PortDrop;
 
-
-        static void set_cycle_framecnt (pframes_t n) {
-                _cycle_nframes = n;
-        }
+       static void set_cycle_framecnt (pframes_t n) {
+               _cycle_nframes = n;
+       }
        static framecnt_t port_offset() { return _global_port_buffer_offset; }
        static void set_global_port_buffer_offset (pframes_t off) {
                _global_port_buffer_offset = off;
@@ -137,7 +139,7 @@ public:
                _global_port_buffer_offset += n;
        }
 
-        virtual void increment_port_buffer_offset (pframes_t n);
+       virtual void increment_port_buffer_offset (pframes_t n);
 
 protected:
 
@@ -147,13 +149,13 @@ protected:
 
        static bool       _connecting_blocked;
        static pframes_t  _global_port_buffer_offset;   /* access only from process() tree */
-        static pframes_t  _cycle_nframes; /* access only from process() tree */
+       static pframes_t  _cycle_nframes; /* access only from process() tree */
+
+       framecnt_t _port_buffer_offset; /* access only from process() tree */
 
-        framecnt_t _port_buffer_offset; /* access only from process() tree */
+       jack_latency_range_t _private_playback_latency;
+       jack_latency_range_t _private_capture_latency;
 
-        jack_latency_range_t _private_playback_latency;
-        jack_latency_range_t _private_capture_latency;
-        
        static AudioEngine* _engine; ///< the AudioEngine
 
 private:
@@ -162,10 +164,12 @@ private:
        bool        _last_monitor;
 
        /** ports that we are connected to, kept so that we can
-           reconnect to JACK when required 
-        */
+           reconnect to JACK when required
+       */
        std::set<std::string> _connections;
 
+       void drop ();
+       PBD::ScopedConnection drop_connection;
 };
 
 }