#include <string>
#include <vector>
#include <cmath>
-#include <jack/jack.h>
-#include <glibmm/thread.h>
+#include <glibmm/threads.h>
#include "pbd/fastlog.h"
#include "pbd/undo.h"
#include "pbd/statefuldestructible.h"
#include "pbd/controllable.h"
+#include "pbd/enum_convert.h"
#include "ardour/ardour.h"
#include "ardour/automation_control.h"
#include "ardour/latent.h"
#include "ardour/port_set.h"
#include "ardour/session_object.h"
+#include "ardour/libardour_visibility.h"
#include "ardour/types.h"
#include "ardour/utils.h"
#include "ardour/buffer_set.h"
* An IO can contain ports of varying types, making routes/inserts/etc with
* varied combinations of types (eg MIDI and audio) possible.
*/
-class IO : public SessionObject, public Latent
+class LIBARDOUR_API IO : public SessionObject, public Latent
{
public:
static const std::string state_node_name;
Output
};
- IO (Session&, const std::string& name, Direction, DataType default_type = DataType::AUDIO);
- IO (Session&, const XMLNode&, DataType default_type = DataType::AUDIO);
+ IO (Session&, const std::string& name, Direction, DataType default_type = DataType::AUDIO, bool sendish = false);
+ IO (Session&, const XMLNode&, DataType default_type = DataType::AUDIO, bool sendish = false);
virtual ~IO();
void set_active(bool yn) { _active = yn; }
bool set_name (const std::string& str);
+ void set_pretty_name (const std::string& str);
+ std::string pretty_name () const { return _pretty_name_prefix; }
- virtual void silence (framecnt_t);
+ virtual void silence (samplecnt_t);
void increment_port_buffer_offset (pframes_t offset);
int ensure_io (ChanCount cnt, bool clear, void *src);
- int connect_ports_to_bundle (boost::shared_ptr<Bundle>, void *);
+ int connect_ports_to_bundle (boost::shared_ptr<Bundle>, bool exclusive, void *);
+ int connect_ports_to_bundle (boost::shared_ptr<Bundle>, bool, bool, void *);
int disconnect_ports_from_bundle (boost::shared_ptr<Bundle>, void *);
BundleList bundles_connected ();
bool connected () const;
bool physically_connected () const;
- framecnt_t signal_latency () const { return 0; }
- framecnt_t latency () const;
+ samplecnt_t signal_latency () const { return 0; }
+
+ samplecnt_t latency () const;
+ samplecnt_t public_latency () const;
+ samplecnt_t connected_latency (bool for_playback) const;
PortSet& ports() { return _ports; }
const PortSet& ports() const { return _ports; }
typedef bool result_type;
template <typename Iter>
- bool operator() (Iter first, Iter last) const {
+ result_type operator() (Iter first, Iter last) const {
bool r = false;
while (first != last) {
if (*first) {
/* three utility functions - this just seems to be simplest place to put them */
void collect_input (BufferSet& bufs, pframes_t nframes, ChanCount offset);
- void process_input (boost::shared_ptr<Processor>, framepos_t start_frame, framepos_t end_frame, pframes_t nframes);
- void copy_to_outputs (BufferSet& bufs, DataType type, pframes_t nframes, framecnt_t offset);
+ void process_input (boost::shared_ptr<Processor>, samplepos_t start_sample, samplepos_t end_sample, double speed, pframes_t nframes);
+ void copy_to_outputs (BufferSet& bufs, DataType type, pframes_t nframes, samplecnt_t offset);
/* AudioTrack::deprecated_use_diskstream_connections() needs these */
int set_ports (const std::string& str);
private:
- mutable Glib::Mutex io_lock;
+ mutable Glib::Threads::Mutex io_lock;
protected:
PortSet _ports;
Direction _direction;
DataType _default_type;
bool _active;
+ bool _sendish;
private:
int connecting_became_legal ();
PBD::ScopedConnection changed;
};
- std::vector<UserBundleInfo*> _bundles_connected; ///< user bundles connected to our ports
-
static int parse_io_string (const std::string&, std::vector<std::string>& chns);
static int parse_gain_string (const std::string&, std::vector<std::string>& chns);
int ensure_ports (ChanCount, bool clear, void *src);
- void check_bundles_connected ();
-
void bundle_changed (Bundle::Change);
int get_port_counts (const XMLNode& node, int version, ChanCount& n, boost::shared_ptr<Bundle>& c);
void setup_bundle ();
std::string bundle_channel_name (uint32_t, uint32_t, DataType) const;
+ void apply_pretty_name ();
+ std::string _pretty_name_prefix;
BufferSet _buffers;
void disconnect_check (boost::shared_ptr<ARDOUR::Port>, boost::shared_ptr<ARDOUR::Port>);
};
} // namespace ARDOUR
+namespace PBD {
+ DEFINE_ENUM_CONVERT (ARDOUR::IO::Direction)
+}
+
#endif /*__ardour_io_h__ */