20 #ifndef __libardour_port_engine_h__
21 #define __libardour_port_engine_h__
86 virtual void* private_handle()
const = 0;
101 virtual const std::string& my_name()
const = 0;
107 virtual bool available()
const = 0;
111 virtual uint32_t port_name_size()
const = 0;
116 virtual int set_port_name (PortHandle port,
const std::string&
name) = 0;
120 virtual std::string get_port_name (PortHandle)
const = 0;
139 virtual int get_port_property (PortHandle,
const std::string& key, std::string& value, std::string& type)
const {
return -1; }
144 virtual PortHandle get_port_by_name (
const std::string&)
const = 0;
157 virtual int get_ports (
const std::string& port_name_pattern,
DataType type,
PortFlags flags, std::vector<std::string>& ports)
const = 0;
162 virtual DataType port_data_type (PortHandle port)
const = 0;
175 virtual void unregister_port (PortHandle) = 0;
183 virtual int connect (
const std::string& src,
const std::string& dst) = 0;
188 virtual int disconnect (
const std::string& src,
const std::string& dst) = 0;
195 virtual int connect (PortHandle src,
const std::string& dst) = 0;
199 virtual int disconnect (PortHandle src,
const std::string& dst) = 0;
204 virtual int disconnect_all (PortHandle port) = 0;
209 virtual bool connected (PortHandle port,
bool process_callback_safe =
true) = 0;
213 virtual bool connected_to (PortHandle,
const std::string&
name,
bool process_callback_safe =
true) = 0;
218 virtual bool physically_connected (PortHandle port,
bool process_callback_safe =
true) = 0;
223 virtual int get_connections (PortHandle port, std::vector<std::string>& names,
bool process_callback_safe =
true) = 0;
237 virtual int midi_event_get (
pframes_t& timestamp,
size_t& size, uint8_t** buf,
void* port_buffer, uint32_t event_index) = 0;
248 virtual int midi_event_put (
void* port_buffer,
pframes_t timestamp,
const uint8_t* buffer,
size_t size) = 0;
252 virtual uint32_t get_midi_event_count (
void* port_buffer) = 0;
260 virtual void midi_clear (
void* port_buffer) = 0;
272 virtual bool can_monitor_input()
const = 0;
283 virtual int request_input_monitoring (PortHandle port,
bool yn) = 0;
290 virtual int ensure_input_monitoring (PortHandle port,
bool yn) = 0;
295 virtual bool monitoring_input (PortHandle port) = 0;
304 virtual void set_latency_range (PortHandle port,
bool for_playback,
LatencyRange r) = 0;
309 virtual LatencyRange get_latency_range (PortHandle port,
bool for_playback) = 0;
316 virtual bool port_is_physical (PortHandle port)
const = 0;
323 virtual void get_physical_outputs (
DataType type, std::vector<std::string>& names) = 0;
329 virtual void get_physical_inputs (
DataType type, std::vector<std::string>& names) = 0;
333 virtual ChanCount n_physical_outputs ()
const = 0;
337 virtual ChanCount n_physical_inputs ()
const = 0;
346 virtual void* get_buffer (PortHandle,
pframes_t) = 0;
358 virtual framepos_t sample_time_at_cycle_start () = 0;
virtual int get_port_property(PortHandle, const std::string &key, std::string &value, std::string &type) const
PortEngine(PortManager &pm)