2 Copyright (C) 2007 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __ardour_internal_port_h__
21 #define __ardour_internal_port_h__
25 #include <sigc++/signal.h>
26 #include <pbd/failed_constructor.h>
27 #include <ardour/port.h>
34 /** Abstract class representing internal (ardour<->ardour only) ports
36 class InternalPort : public virtual Port {
41 std::string short_name();
43 int set_name (std::string str);
45 int connected () const;
49 bool connected_to (const std::string& portname) const;
51 const char ** get_connections () const;
52 bool monitoring_input () const { return false; }
54 void ensure_monitor_input (bool yn) {}
55 void request_monitor_input (bool yn) {}
57 nframes_t latency () const { return _latency; }
58 nframes_t total_latency() const { return _latency; }
60 void set_latency (nframes_t nframes);
62 static void connect (InternalPort& src, InternalPort& dst);
63 static void disconnect (InternalPort& a, InternalPort& b);
66 friend class AudioEngine;
68 InternalPort (const std::string&, DataType type, Flags flags);
71 void recompute_total_latency() const;
73 std::list<InternalPort*> _connections;
76 static AudioEngine* engine;
77 static void set_engine (AudioEngine* e);
82 #endif /* __ardour_internal_port_h__ */