21 #ifndef __libardour_jack_audiobackend_h__
22 #define __libardour_jack_audiobackend_h__
162 int connect (
const std::string& src,
const std::string& dst);
163 int disconnect (
const std::string& src,
const std::string& dst);
172 return std::vector<AudioBackend::DeviceStatus> ();
259 std::function<void()>
f;
306 typedef std::map<std::string,std::shared_ptr<JackPort> >
JackPorts;
326 int _start (
bool for_latency_measurement);
AudioBackendInfo & info() const
pframes_t samples_since_cycle_start()
int disconnect(PortHandle, const std::string &)
int set_sample_rate(float)
DataType port_data_type(PortHandle) const
int set_interleaved(bool yn)
void jack_timebase_callback(jack_transport_state_t, pframes_t, jack_position_t *, int)
uint32_t buffer_size() const
static int _bufsize_callback(pframes_t nframes, void *arg)
int set_systemic_output_latency(uint32_t)
bool can_set_systemic_midi_latencies() const
int create_process_thread(std::function< void()> func)
uint32_t systemic_output_latency() const
int ensure_input_monitoring(PortHandle, bool)
int disconnect_all(PortHandle)
const std::string & my_name() const
uint32_t _target_num_periods
ChanCount n_physical_inputs() const
uint32_t _target_systemic_output_latency
uint32_t systemic_input_latency() const
DriverDeviceMap all_devices
bool port_is_physical(PortHandle) const
uint32_t _current_sample_rate
int midi_event_put(void *port_buffer, pframes_t timestamp, const uint8_t *buffer, size_t size)
size_t raw_buffer_size(DataType t)
PBD::ScopedConnection disconnect_connection
bool connected(PortHandle, bool process_callback_safe)
void get_physical_inputs(DataType type, std::vector< std::string > &)
void disconnected(const char *)
int set_midi_option(const std::string &)
TransportState transport_state() const
void * private_handle() const
uint32_t process_thread_count()
bool midi_device_enabled(std::string const) const
samplepos_t sample_time()
void unregister_port(PortHandle)
JACKAudioBackend(AudioEngine &e, AudioBackendInfo &info, std::shared_ptr< JackConnection >)
bool can_change_sample_rate_when_running() const
uint32_t _target_systemic_input_latency
void jack_latency_callback(jack_latency_callback_mode_t)
int _start(bool for_latency_measurement)
static void * _start_process_thread(void *)
std::vector< std::string > enumerate_midi_options() const
void get_physical(DataType type, unsigned long flags, std::vector< std::string > &phy) const
int connect(const std::string &src, const std::string &dst)
static void * _process_thread(void *arg)
bool can_measure_systemic_latency() const
PBD::ScopedConnection jack_connection_connection
SerializedRCUManager< JackPorts > _jack_ports
std::map< DataType, size_t > _raw_buffer_sizes
void freewheel_callback(int)
std::string get_port_name(PortHandle) const
float sample_rate() const
static void _freewheel_callback(int, void *arg)
float _target_sample_rate
bool connected_to(PortHandle, const std::string &, bool process_callback_safe)
uint32_t period_size() const
jack_native_thread_t _main_thread
int set_buffer_size(uint32_t)
bool monitoring_input(PortHandle)
int set_time_master(bool)
uint32_t port_name_size() const
int set_systemic_midi_input_latency(std::string const, uint32_t)
bool can_change_buffer_size_when_running() const
void * get_buffer(PortHandle, pframes_t)
static void _connect_callback(jack_port_id_t, jack_port_id_t, int, void *)
int get_ports(const std::string &port_name_pattern, DataType type, PortFlags flags, std::vector< std::string > &) const
std::string _target_device
bool can_monitor_input() const
void setup_jack_startup_command(bool for_latency_measurement)
std::shared_ptr< JackConnection > _jack_connection
int midi_event_get(pframes_t ×tamp, size_t &size, uint8_t const **buf, void *port_buffer, uint32_t event_index)
std::vector< jack_native_thread_t > _jack_threads
int process_callback(pframes_t nframes)
std::string driver_name() const
void set_jack_callbacks()
std::set< std::string > DeviceList
int jack_sample_rate_callback(pframes_t)
int set_device_name(const std::string &)
void launch_control_app()
uint32_t _target_input_channels
int get_connections(PortHandle, std::vector< std::string > &, bool process_callback_safe)
int request_input_monitoring(PortHandle, bool)
bool physically_connected(PortHandle, bool process_callback_safe)
int set_port_property(PortHandle, const std::string &key, const std::string &value, const std::string &type)
PortPtr get_port_by_name(const std::string &) const
std::vector< std::string > enumerate_drivers() const
void jack_registration_callback(jack_port_id_t, int)
bool can_set_period_size() const
int client_real_time_priority()
int connect(PortHandle, const std::string &)
int disconnect(const std::string &src, const std::string &dst)
Glib::Threads::Mutex server_call_mutex
std::map< std::string, DeviceList > DriverDeviceMap
int set_port_name(PortHandle, const std::string &)
uint32_t _target_output_channels
PortPtr register_port(const std::string &shortname, ARDOUR::DataType, ARDOUR::PortFlags)
std::map< std::string, std::shared_ptr< JackPort > > JackPorts
int set_midi_device_enabled(std::string const, bool)
PortFlags get_port_flags(PortHandle) const
void connect_callback(jack_port_id_t, jack_port_id_t, int)
LatencyRange get_latency_range(PortHandle, bool for_playback)
std::vector< DeviceStatus > enumerate_midi_devices() const
static void _latency_callback(jack_latency_callback_mode_t, void *)
int get_port_property(PortHandle, const std::string &key, std::string &value, std::string &type) const
uint32_t _current_buffer_size
void midi_clear(void *port_buffer)
static void _session_callback(jack_session_event_t *event, void *arg)
int set_driver(const std::string &)
static int _jack_sync_callback(jack_transport_state_t, jack_position_t *, void *arg)
ChanCount n_physical(unsigned long flags) const
int jack_sync_callback(jack_transport_state_t, jack_position_t *)
int set_systemic_input_latency(uint32_t)
int jack_bufsize_callback(pframes_t)
bool requires_driver_selection() const
static void _registration_callback(jack_port_id_t, int, void *)
std::vector< uint32_t > available_period_sizes(const std::string &driver, const std::string &device) const
bool externally_connected(PortHandle, bool process_callback_safe)
static int _graph_order_callback(void *arg)
static int _xrun_callback(void *arg)
static bool already_configured()
void when_connected_to_jack()
int join_process_threads()
uint32_t systemic_midi_output_latency(std::string const) const
std::vector< float > available_sample_rates(const std::string &device) const
int set_peridod_size(uint32_t)
std::string _target_driver
void get_physical_outputs(DataType type, std::vector< std::string > &)
void transport_locate(samplepos_t)
std::vector< uint32_t > available_buffer_sizes(const std::string &device) const
SampleFormat _target_sample_format
std::vector< DeviceStatus > enumerate_devices() const
bool speed_and_position(double &sp, samplepos_t &pos)
std::string control_app_name() const
void set_latency_range(PortHandle, bool for_playback, LatencyRange)
samplepos_t sample_time_at_cycle_start()
int set_systemic_midi_output_latency(std::string const, uint32_t)
samplepos_t transport_sample() const
uint32_t systemic_midi_input_latency(std::string const) const
std::string _target_midi_option
uint32_t get_midi_event_count(void *port_buffer)
ChanCount n_physical_outputs() const
std::string device_name() const
std::string midi_option() const
static void _jack_timebase_callback(jack_transport_state_t, pframes_t, jack_position_t *, int, void *)
bool get_sync_offset(pframes_t &) const
static int _sample_rate_callback(pframes_t nframes, void *arg)
uint32_t _target_buffer_size
PortPtr const & PortHandle
std::shared_ptr< ProtoPort > PortPtr
Temporal::samplepos_t samplepos_t
ThreadData(JACKAudioBackend *e, std::function< void()> fp, size_t stacksz)
JACKAudioBackend * engine