Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::JACKAudioBackend Class Reference

#include <jack_audiobackend.h>

Inheritance diagram for ARDOUR::JACKAudioBackend:
[legend]

Classes

struct  ThreadData
 

Public Member Functions

 JACKAudioBackend (AudioEngine &e, AudioBackendInfo &info, std::shared_ptr< JackConnection >)
 
 ~JACKAudioBackend ()
 
std::string name () const
 
void * private_handle () const
 
bool is_realtime () const
 
bool is_jack () const
 
bool requires_driver_selection () const
 
std::vector< std::string > enumerate_drivers () const
 
int set_driver (const std::string &)
 
std::vector< DeviceStatusenumerate_devices () const
 
std::vector< float > available_sample_rates (const std::string &device) const
 
std::vector< uint32_t > available_buffer_sizes (const std::string &device) const
 
std::vector< uint32_t > available_period_sizes (const std::string &driver, const std::string &device) const
 
bool can_change_sample_rate_when_running () const
 
bool can_change_buffer_size_when_running () const
 
int set_device_name (const std::string &)
 
int set_sample_rate (float)
 
int set_buffer_size (uint32_t)
 
int set_peridod_size (uint32_t)
 
int set_interleaved (bool yn)
 
int set_systemic_input_latency (uint32_t)
 
int set_systemic_output_latency (uint32_t)
 
int set_systemic_midi_input_latency (std::string const, uint32_t)
 
int set_systemic_midi_output_latency (std::string const, uint32_t)
 
int reset_device ()
 
std::string device_name () const
 
float sample_rate () const
 
uint32_t buffer_size () const
 
uint32_t period_size () const
 
bool interleaved () const
 
uint32_t systemic_input_latency () const
 
uint32_t systemic_output_latency () const
 
uint32_t systemic_midi_input_latency (std::string const) const
 
uint32_t systemic_midi_output_latency (std::string const) const
 
std::string driver_name () const
 
std::string control_app_name () const
 
void launch_control_app ()
 
int stop ()
 
int freewheel (bool)
 
float dsp_load () const
 
samplepos_t sample_time ()
 
samplepos_t sample_time_at_cycle_start ()
 
pframes_t samples_since_cycle_start ()
 
size_t raw_buffer_size (DataType t)
 
int create_process_thread (std::function< void()> func)
 
int join_process_threads ()
 
bool in_process_thread ()
 
uint32_t process_thread_count ()
 
int client_real_time_priority ()
 
void transport_start ()
 
void transport_stop ()
 
void transport_locate (samplepos_t)
 
TransportState transport_state () const
 
samplepos_t transport_sample () const
 
int set_time_master (bool)
 
bool get_sync_offset (pframes_t &) const
 
void update_latencies ()
 
const std::string & my_name () const
 
uint32_t port_name_size () const
 
int set_port_name (PortHandle, const std::string &)
 
std::string get_port_name (PortHandle) const
 
PortFlags get_port_flags (PortHandle) const
 
PortPtr get_port_by_name (const std::string &) const
 
int get_port_property (PortHandle, const std::string &key, std::string &value, std::string &type) const
 
int set_port_property (PortHandle, const std::string &key, const std::string &value, const std::string &type)
 
int get_ports (const std::string &port_name_pattern, DataType type, PortFlags flags, std::vector< std::string > &) const
 
DataType port_data_type (PortHandle) const
 
PortPtr register_port (const std::string &shortname, ARDOUR::DataType, ARDOUR::PortFlags)
 
void unregister_port (PortHandle)
 
bool connected (PortHandle, bool process_callback_safe)
 
bool connected_to (PortHandle, const std::string &, bool process_callback_safe)
 
bool physically_connected (PortHandle, bool process_callback_safe)
 
bool externally_connected (PortHandle, bool process_callback_safe)
 
int get_connections (PortHandle, std::vector< std::string > &, bool process_callback_safe)
 
int connect (PortHandle, const std::string &)
 
int disconnect (PortHandle, const std::string &)
 
int disconnect_all (PortHandle)
 
int connect (const std::string &src, const std::string &dst)
 
int disconnect (const std::string &src, const std::string &dst)
 
std::vector< std::string > enumerate_midi_options () const
 
int set_midi_option (const std::string &)
 
std::string midi_option () const
 
std::vector< DeviceStatusenumerate_midi_devices () const
 
int set_midi_device_enabled (std::string const, bool)
 
bool midi_device_enabled (std::string const) const
 
bool can_set_systemic_midi_latencies () const
 
bool can_set_period_size () const
 
bool can_measure_systemic_latency () const
 
int midi_event_get (pframes_t &timestamp, size_t &size, uint8_t const **buf, void *port_buffer, uint32_t event_index)
 
int midi_event_put (void *port_buffer, pframes_t timestamp, const uint8_t *buffer, size_t size)
 
uint32_t get_midi_event_count (void *port_buffer)
 
void midi_clear (void *port_buffer)
 
bool can_monitor_input () const
 
int request_input_monitoring (PortHandle, bool)
 
int ensure_input_monitoring (PortHandle, bool)
 
bool monitoring_input (PortHandle)
 
void set_latency_range (PortHandle, bool for_playback, LatencyRange)
 
LatencyRange get_latency_range (PortHandle, bool for_playback)
 
bool port_is_physical (PortHandle) const
 
void get_physical_outputs (DataType type, std::vector< std::string > &)
 
void get_physical_inputs (DataType type, std::vector< std::string > &)
 
ChanCount n_physical_outputs () const
 
ChanCount n_physical_inputs () const
 
void * get_buffer (PortHandle, pframes_t)
 
bool speed_and_position (double &sp, samplepos_t &pos)
 
- Public Member Functions inherited from ARDOUR::AudioBackend
 AudioBackend (AudioEngine &e, AudioBackendInfo &i)
 
virtual ~AudioBackend ()
 
AudioBackendInfoinfo () const
 
virtual bool use_separate_input_and_output_devices () const
 
virtual bool match_input_output_devices_or_none () const
 
virtual std::vector< DeviceStatusenumerate_input_devices () const
 
virtual std::vector< DeviceStatusenumerate_output_devices () const
 
virtual bool can_request_update_devices ()
 
virtual bool update_devices ()
 
virtual bool can_use_buffered_io ()
 
virtual void set_use_buffered_io (bool)
 
virtual bool get_use_buffered_io ()
 
virtual std::vector< float > available_sample_rates2 (const std::string &input_device, const std::string &output_device) const
 
virtual float default_sample_rate () const
 
virtual std::vector< uint32_t > available_buffer_sizes2 (const std::string &input_device, const std::string &output_device) const
 
virtual uint32_t default_buffer_size (const std::string &device) const
 
virtual bool can_change_systemic_latency_when_running () const
 
virtual int set_input_device_name (const std::string &)
 
virtual int set_output_device_name (const std::string &)
 
virtual int drop_device ()
 
virtual std::string input_device_name () const
 
virtual std::string output_device_name () const
 
int start (bool for_latency_measurement=false)
 
virtual int usecs_per_cycle () const
 
- Public Member Functions inherited from ARDOUR::PortEngine
 PortEngine (PortManager &pm)
 
virtual ~PortEngine ()
 

Static Public Member Functions

static bool already_configured ()
 
- Static Public Member Functions inherited from ARDOUR::AudioBackend
static std::string get_error_string (ErrorCode)
 
static std::string get_standard_device_name (StandardDeviceName)
 
static size_t thread_stack_size ()
 

Protected Member Functions

int _start (bool for_latency_measurement)
 

Private Types

typedef std::set< std::string > DeviceList
 
typedef std::map< std::string, DeviceListDriverDeviceMap
 
typedef std::map< std::string, std::shared_ptr< JackPort > > JackPorts
 

Private Member Functions

void jack_timebase_callback (jack_transport_state_t, pframes_t, jack_position_t *, int)
 
int jack_sync_callback (jack_transport_state_t, jack_position_t *)
 
int jack_bufsize_callback (pframes_t)
 
int jack_sample_rate_callback (pframes_t)
 
void freewheel_callback (int)
 
int process_callback (pframes_t nframes)
 
void jack_latency_callback (jack_latency_callback_mode_t)
 
void disconnected (const char *)
 
void set_jack_callbacks ()
 
int reconnect_to_jack ()
 
bool available () const
 
void * process_thread ()
 
void setup_jack_startup_command (bool for_latency_measurement)
 
void jack_registration_callback (jack_port_id_t, int)
 
void connect_callback (jack_port_id_t, jack_port_id_t, int)
 
ChanCount n_physical (unsigned long flags) const
 
void get_physical (DataType type, unsigned long flags, std::vector< std::string > &phy) const
 
void when_connected_to_jack ()
 

Static Private Member Functions

static int _xrun_callback (void *arg)
 
static void * _process_thread (void *arg)
 
static int _sample_rate_callback (pframes_t nframes, void *arg)
 
static int _bufsize_callback (pframes_t nframes, void *arg)
 
static void _jack_timebase_callback (jack_transport_state_t, pframes_t, jack_position_t *, int, void *)
 
static int _jack_sync_callback (jack_transport_state_t, jack_position_t *, void *arg)
 
static void _freewheel_callback (int, void *arg)
 
static void _latency_callback (jack_latency_callback_mode_t, void *)
 
static void _session_callback (jack_session_event_t *event, void *arg)
 
static void * _start_process_thread (void *)
 
static int _graph_order_callback (void *arg)
 
static void _registration_callback (jack_port_id_t, int, void *)
 
static void _connect_callback (jack_port_id_t, jack_port_id_t, int, void *)
 

Private Attributes

std::shared_ptr< JackConnection_jack_connection
 
bool _running
 
bool _freewheeling
 
std::map< DataType, size_t > _raw_buffer_sizes
 
std::vector< jack_native_thread_t > _jack_threads
 
jack_native_thread_t _main_thread
 
std::string _target_driver
 
std::string _target_device
 
float _target_sample_rate
 
uint32_t _target_buffer_size
 
uint32_t _target_num_periods
 
SampleFormat _target_sample_format
 
bool _target_interleaved
 
uint32_t _target_input_channels
 
uint32_t _target_output_channels
 
uint32_t _target_systemic_input_latency
 
uint32_t _target_systemic_output_latency
 
uint32_t _current_sample_rate
 
uint32_t _current_buffer_size
 
std::string _target_midi_option
 
DriverDeviceMap all_devices
 
PBD::ScopedConnection disconnect_connection
 
SerializedRCUManager< JackPorts_jack_ports
 
PBD::ScopedConnection jack_connection_connection
 
JACKSession_session
 
Glib::Threads::Mutex server_call_mutex
 

Additional Inherited Members

- Public Types inherited from ARDOUR::AudioBackend
enum  ErrorCode {
  NoError = 0 , BackendInitializationError = -64 , BackendDeinitializationError , BackendReinitializationError ,
  AudioDeviceOpenError , AudioDeviceCloseError , AudioDeviceInvalidError , AudioDeviceNotAvailableError ,
  AudioDeviceNotConnectedError , AudioDeviceReservationError , AudioDeviceIOError , MidiDeviceOpenError ,
  MidiDeviceCloseError , MidiDeviceNotAvailableError , MidiDeviceNotConnectedError , MidiDeviceIOError ,
  SampleFormatNotSupportedError , SampleRateNotSupportedError , RequestedInputLatencyNotSupportedError , RequestedOutputLatencyNotSupportedError ,
  PeriodSizeNotSupportedError , PeriodCountNotSupportedError , DeviceConfigurationNotSupportedError , ChannelCountNotSupportedError ,
  InputChannelCountNotSupportedError , OutputChannelCountNotSupportedError , AquireRealtimePermissionError , SettingAudioThreadPriorityError ,
  SettingMIDIThreadPriorityError , ProcessThreadStartError , FreewheelThreadStartError , PortRegistrationError ,
  PortReconnectError , OutOfMemoryError
}
 
enum  StandardDeviceName { DeviceNone , DeviceDefault }
 
enum  TimingTypes { DeviceWait = 0 , RunLoop , NTT }
 
- Public Types inherited from ARDOUR::PortEngine
typedef std::shared_ptr< ProtoPortPortPtr
 
typedef PortPtr const & PortHandle
 
- Public Attributes inherited from ARDOUR::AudioBackend
PBD::TimingStats dsp_stats [NTT]
 
- Protected Attributes inherited from ARDOUR::AudioBackend
AudioBackendInfo_info
 
AudioEngineengine
 
- Protected Attributes inherited from ARDOUR::PortEngine
PortManagermanager
 

Detailed Description

Definition at line 52 of file jack_audiobackend.h.

Member Typedef Documentation

◆ DeviceList

typedef std::set<std::string> ARDOUR::JACKAudioBackend::DeviceList
private

Definition at line 288 of file jack_audiobackend.h.

◆ DriverDeviceMap

typedef std::map<std::string,DeviceList> ARDOUR::JACKAudioBackend::DriverDeviceMap
private

Definition at line 289 of file jack_audiobackend.h.

◆ JackPorts

typedef std::map<std::string,std::shared_ptr<JackPort> > ARDOUR::JACKAudioBackend::JackPorts
private

Definition at line 306 of file jack_audiobackend.h.

Constructor & Destructor Documentation

◆ JACKAudioBackend()

ARDOUR::JACKAudioBackend::JACKAudioBackend ( AudioEngine e,
AudioBackendInfo info,
std::shared_ptr< JackConnection  
)

◆ ~JACKAudioBackend()

ARDOUR::JACKAudioBackend::~JACKAudioBackend ( )

Member Function Documentation

◆ _bufsize_callback()

static int ARDOUR::JACKAudioBackend::_bufsize_callback ( pframes_t  nframes,
void *  arg 
)
staticprivate

◆ _connect_callback()

static void ARDOUR::JACKAudioBackend::_connect_callback ( jack_port_id_t  ,
jack_port_id_t  ,
int  ,
void *   
)
staticprivate

◆ _freewheel_callback()

static void ARDOUR::JACKAudioBackend::_freewheel_callback ( int  ,
void *  arg 
)
staticprivate

◆ _graph_order_callback()

static int ARDOUR::JACKAudioBackend::_graph_order_callback ( void *  arg)
staticprivate

◆ _jack_sync_callback()

static int ARDOUR::JACKAudioBackend::_jack_sync_callback ( jack_transport_state_t  ,
jack_position_t *  ,
void *  arg 
)
staticprivate

◆ _jack_timebase_callback()

static void ARDOUR::JACKAudioBackend::_jack_timebase_callback ( jack_transport_state_t  ,
pframes_t  ,
jack_position_t *  ,
int  ,
void *   
)
staticprivate

◆ _latency_callback()

static void ARDOUR::JACKAudioBackend::_latency_callback ( jack_latency_callback_mode_t  ,
void *   
)
staticprivate

◆ _process_thread()

static void* ARDOUR::JACKAudioBackend::_process_thread ( void *  arg)
staticprivate

◆ _registration_callback()

static void ARDOUR::JACKAudioBackend::_registration_callback ( jack_port_id_t  ,
int  ,
void *   
)
staticprivate

◆ _sample_rate_callback()

static int ARDOUR::JACKAudioBackend::_sample_rate_callback ( pframes_t  nframes,
void *  arg 
)
staticprivate

◆ _session_callback()

static void ARDOUR::JACKAudioBackend::_session_callback ( jack_session_event_t *  event,
void *  arg 
)
staticprivate

◆ _start()

int ARDOUR::JACKAudioBackend::_start ( bool  for_latency_measurement)
protectedvirtual

Implements ARDOUR::AudioBackend.

◆ _start_process_thread()

static void* ARDOUR::JACKAudioBackend::_start_process_thread ( void *  )
staticprivate

◆ _xrun_callback()

static int ARDOUR::JACKAudioBackend::_xrun_callback ( void *  arg)
staticprivate

◆ already_configured()

static bool ARDOUR::JACKAudioBackend::already_configured ( )
static

◆ available()

bool ARDOUR::JACKAudioBackend::available ( ) const
private

◆ available_buffer_sizes()

std::vector<uint32_t> ARDOUR::JACKAudioBackend::available_buffer_sizes ( const std::string &  device) const
virtual

Returns a collection of uint32 identifying buffer sizes that are potentially usable with the hardware identified by device . Any of these values may be supplied in other calls to this backend as the desired buffer size to use with the name device, but the requested buffer size may turn out to be unavailable, or become invalid at any time.

Implements ARDOUR::AudioBackend.

◆ available_period_sizes()

std::vector<uint32_t> ARDOUR::JACKAudioBackend::available_period_sizes ( const std::string &  driver,
const std::string &  device 
) const
virtual

Returns a vector of supported period-sizes for the given driver

Reimplemented from ARDOUR::AudioBackend.

◆ available_sample_rates()

std::vector<float> ARDOUR::JACKAudioBackend::available_sample_rates ( const std::string &  device) const
virtual

Returns a collection of float identifying sample rates that are potentially usable with the hardware identified by device . Any of these values may be supplied in other calls to this backend as the desired sample rate to use with the name device, but the requested sample rate may turn out to be unavailable, or become invalid at any time.

Implements ARDOUR::AudioBackend.

◆ buffer_size()

uint32_t ARDOUR::JACKAudioBackend::buffer_size ( ) const
virtual

Implements ARDOUR::AudioBackend.

◆ can_change_buffer_size_when_running()

bool ARDOUR::JACKAudioBackend::can_change_buffer_size_when_running ( ) const
virtual

Implements ARDOUR::AudioBackend.

◆ can_change_sample_rate_when_running()

bool ARDOUR::JACKAudioBackend::can_change_sample_rate_when_running ( ) const
virtual

Implements ARDOUR::AudioBackend.

◆ can_measure_systemic_latency()

bool ARDOUR::JACKAudioBackend::can_measure_systemic_latency ( ) const
inlinevirtual

return true if the backend is configured using a single full-duplex device and measuring systemic latency can produce meaningful results.

Implements ARDOUR::AudioBackend.

Definition at line 186 of file jack_audiobackend.h.

◆ can_monitor_input()

bool ARDOUR::JACKAudioBackend::can_monitor_input ( ) const
virtual

Return true if the implementation can offer input monitoring.

Input monitoring involves the (selective) routing of incoming data to an outgoing data stream, without the data being passed to the CPU.

Only certain audio hardware can provide this, and only certain audio APIs can offer it.

Implements ARDOUR::PortEngine.

◆ can_set_period_size()

bool ARDOUR::JACKAudioBackend::can_set_period_size ( ) const
inlinevirtual

An interface to set buffers/period for playback latency. useful for ALSA or JACK/ALSA on Linux.

Returns
true if the backend supports period-size configuration

Reimplemented from ARDOUR::AudioBackend.

Definition at line 183 of file jack_audiobackend.h.

◆ can_set_systemic_midi_latencies()

bool ARDOUR::JACKAudioBackend::can_set_systemic_midi_latencies ( ) const
inlinevirtual

if backend supports systemic_midi_[in|ou]tput_latency()

Implements ARDOUR::AudioBackend.

Definition at line 180 of file jack_audiobackend.h.

◆ client_real_time_priority()

int ARDOUR::JACKAudioBackend::client_real_time_priority ( )
virtual

Reimplemented from ARDOUR::AudioBackend.

◆ connect() [1/2]

int ARDOUR::JACKAudioBackend::connect ( const std::string &  src,
const std::string &  dst 
)
virtual

Ensure that data written to the port named by src will be readable from the port named by dst

Parameters
srcname of source port to connect
dstname of destination (sink) port
Returns
zero on success, non-zero otherwise.

Implements ARDOUR::PortEngine.

◆ connect() [2/2]

int ARDOUR::JACKAudioBackend::connect ( PortHandle  src,
const std::string &  dst 
)
virtual

Ensure that data written to the port referenced by src will be readable from the port named by dst

Parameters
srcPortHandle of source port to connect
dstPortHandle of destination (sink) port
Returns
zero on success, non-zero otherwise.

Implements ARDOUR::PortEngine.

◆ connect_callback()

void ARDOUR::JACKAudioBackend::connect_callback ( jack_port_id_t  ,
jack_port_id_t  ,
int   
)
private

◆ connected()

bool ARDOUR::JACKAudioBackend::connected ( PortHandle  port,
bool  process_callback_safe 
)
virtual

Test if given port is connected

Parameters
portPortHandle of port to test
process_callback_safetrue if this method is not called from rt-context of backend callbacks
Returns
true if the port referred to by port has any connections to other ports. Return false otherwise.

Implements ARDOUR::PortEngine.

◆ connected_to()

bool ARDOUR::JACKAudioBackend::connected_to ( PortHandle  port,
const std::string &  name,
bool  process_callback_safe 
)
virtual

Test port connection

Parameters
portPortHandle of source port to test
namename of destination to test
process_callback_safetrue if this method is not called from rt-context of backend callbacks
Returns
true if the port referred to by port is connected to the port named by name . Return false otherwise.

Implements ARDOUR::PortEngine.

◆ control_app_name()

std::string ARDOUR::JACKAudioBackend::control_app_name ( ) const
virtual

Return the name of a control application for the selected/in-use device. If no such application exists, or if no device has been selected or is in-use, return an empty string.

Implements ARDOUR::AudioBackend.

◆ create_process_thread()

int ARDOUR::JACKAudioBackend::create_process_thread ( std::function< void()>  func)
virtual

Create a new thread suitable for running part of the buffer process cycle (i.e. Realtime scheduling, memory allocation, stacksize, etc. are all correctly setup). The thread will begin executing func, and will exit when that function returns.

Parameters
funcprocess function to run

Implements ARDOUR::AudioBackend.

◆ device_name()

std::string ARDOUR::JACKAudioBackend::device_name ( ) const
virtual

Implements ARDOUR::AudioBackend.

◆ disconnect() [1/2]

int ARDOUR::JACKAudioBackend::disconnect ( const std::string &  src,
const std::string &  dst 
)
virtual

Remove any existing connection between the ports named by src and dst

Parameters
srcname of source port to dis-connect to disconnect from
dstname of destination (sink) port to disconnect
Returns
zero on success, non-zero otherwise.

Implements ARDOUR::PortEngine.

◆ disconnect() [2/2]

int ARDOUR::JACKAudioBackend::disconnect ( PortHandle  src,
const std::string &  dst 
)
virtual

Remove any existing connection between the port referenced by src and the port named dst

Parameters
srcPortHandle of source port to disconnect from
dstPortHandle of destination (sink) port to disconnect
Returns
zero on success, non-zero otherwise.

Implements ARDOUR::PortEngine.

◆ disconnect_all()

int ARDOUR::JACKAudioBackend::disconnect_all ( PortHandle  port)
virtual

Remove all connections between the port referred to by port and any other ports.

Parameters
portPortHandle of port to disconnect
Returns
zero on success, non-zero otherwise.

Implements ARDOUR::PortEngine.

◆ disconnected()

void ARDOUR::JACKAudioBackend::disconnected ( const char *  )
private

◆ driver_name()

std::string ARDOUR::JACKAudioBackend::driver_name ( ) const
virtual

override this if this implementation returns true from requires_driver_selection()

Reimplemented from ARDOUR::AudioBackend.

◆ dsp_load()

float ARDOUR::JACKAudioBackend::dsp_load ( ) const
virtual

return the fraction of the time represented by the current buffer size that is being used for each buffer process cycle, as a value from 0.0 to 1.0

E.g. if the buffer size represents 5msec and current processing takes 1msec, the returned value should be 0.2.

Implementations can feel free to smooth the values returned over time (e.g. high pass filtering, or its equivalent).

Implements ARDOUR::AudioBackend.

◆ ensure_input_monitoring()

int ARDOUR::JACKAudioBackend::ensure_input_monitoring ( PortHandle  ,
bool   
)
virtual

Implements ARDOUR::PortEngine.

◆ enumerate_devices()

std::vector<DeviceStatus> ARDOUR::JACKAudioBackend::enumerate_devices ( ) const
virtual

Returns a collection of DeviceStatuses identifying devices discovered by this backend since the start of the process.

Any of the names in each DeviceStatus may be used to identify a device in other calls to the backend, though any of them may become invalid at any time.

Implements ARDOUR::AudioBackend.

◆ enumerate_drivers()

std::vector<std::string> ARDOUR::JACKAudioBackend::enumerate_drivers ( ) const
virtual

If the return value of requires_driver_selection() is true, then this function can return the list of known driver names.

If the return value of requires_driver_selection() is false, then this function should not be called. If it is called its return value is an empty vector of strings.

Reimplemented from ARDOUR::AudioBackend.

◆ enumerate_midi_devices()

std::vector<DeviceStatus> ARDOUR::JACKAudioBackend::enumerate_midi_devices ( ) const
inlinevirtual

Detailed MIDI device list - if available

Implements ARDOUR::AudioBackend.

Definition at line 171 of file jack_audiobackend.h.

◆ enumerate_midi_options()

std::vector<std::string> ARDOUR::JACKAudioBackend::enumerate_midi_options ( ) const
virtual

Implements ARDOUR::AudioBackend.

◆ externally_connected()

bool ARDOUR::JACKAudioBackend::externally_connected ( PortHandle  port,
bool  process_callback_safe 
)
virtual

Test if given port is has external connections.

Parameters
portPortHandle of port to test
process_callback_safetrue if this method is not called from rt-context of backend callbacks
Returns
true if the port referred to by port has any connections to external, not-ardour owned, ports.

Reimplemented from ARDOUR::PortEngine.

◆ freewheel()

int ARDOUR::JACKAudioBackend::freewheel ( bool  start_stop)
virtual

While remaining connected to the device, and without changing its configuration, start (or stop) calling the process_callback of the engine without waiting for the device. Once process_callback() has returned, it will be called again immediately, thus allowing for faster-than-realtime processing.

All registered ports remain in existence and all connections remain unaltered. However, any physical ports should NOT be used by the process_callback() during freewheeling - the data behaviour is undefined.

If start_stop is true, begin this behaviour; otherwise cease this behaviour if it currently occuring, and return to calling process_callback() of the engine by waiting for the device.

Parameters
start_stoptrue to engage freewheel processing
Returns
zero on success, non-zero otherwise.

Implements ARDOUR::AudioBackend.

◆ freewheel_callback()

void ARDOUR::JACKAudioBackend::freewheel_callback ( int  )
private

◆ get_buffer()

void* ARDOUR::JACKAudioBackend::get_buffer ( PortHandle  port,
pframes_t  off 
)
virtual

Return the address of the memory area where data for the port can be written (if the port has the PortFlag IsOutput set) or read (if the port has the PortFlag IsInput set).

The return value is untyped because buffers containing different data depending on the port type.

Parameters
portPortHandle
offmemory offset
Returns
pointer to raw memory area

Implements ARDOUR::PortEngine.

◆ get_connections()

int ARDOUR::JACKAudioBackend::get_connections ( PortHandle  port,
std::vector< std::string > &  names,
bool  process_callback_safe 
)
virtual

Place the names of all ports connected to the port named by port into names .

Parameters
portPortHandle
namesarray or returned port-names
process_callback_safetrue if this method is not called from rt-context of backend callbacks
Returns
number of connections found

Implements ARDOUR::PortEngine.

◆ get_latency_range()

LatencyRange ARDOUR::JACKAudioBackend::get_latency_range ( PortHandle  port,
bool  for_playback 
)
virtual

Return the latency range for the port referred to by port . The playback range will be returned if for_playback is true, otherwise the capture range will be returned.

Parameters
portThe PortHandle to query
for_playbackWhen true, playback (downstream) latency is queried, false for capture (upstream) latency.

Implements ARDOUR::PortEngine.

◆ get_midi_event_count()

uint32_t ARDOUR::JACKAudioBackend::get_midi_event_count ( void *  port_buffer)
virtual

Query the number of MIDI events in the data at port_buffer

Parameters
port_bufferthe midi-port buffer
Returns
the number of MIDI events in the data at port_buffer

Implements ARDOUR::PortEngine.

◆ get_physical()

void ARDOUR::JACKAudioBackend::get_physical ( DataType  type,
unsigned long  flags,
std::vector< std::string > &  phy 
) const
private

◆ get_physical_inputs()

void ARDOUR::JACKAudioBackend::get_physical_inputs ( DataType  type,
std::vector< std::string > &  names 
)
virtual

Store into names the names of all ports with the IsInput and IsPhysical flags set, that handle data of type type .

This can be used to discover inputs associated with hardware devices.

Implements ARDOUR::PortEngine.

◆ get_physical_outputs()

void ARDOUR::JACKAudioBackend::get_physical_outputs ( DataType  type,
std::vector< std::string > &  names 
)
virtual

Store into names the names of all ports with the IsOutput and IsPhysical flag set, that handle data of type type .

This can be used to discover outputs associated with hardware devices.

Parameters
typeData-type to lookup
namesreturn value to populate with names

Implements ARDOUR::PortEngine.

◆ get_port_by_name()

PortPtr ARDOUR::JACKAudioBackend::get_port_by_name ( const std::string &  name) const
virtual

Return a reference to a port with the fullname name .

Parameters
nameFull port-name to lookup
Returns
PortHandle if lookup was successful, or an "empty" PortHandle (analogous to a null pointer) if no such port exists.

Implements ARDOUR::PortEngine.

◆ get_port_flags()

PortFlags ARDOUR::JACKAudioBackend::get_port_flags ( PortHandle  port) const
virtual

Query port-flags

Parameters
portPortHandle
Returns
the flags of the port referred to by port . If the port does not exist, return PortFlags (0)

Implements ARDOUR::PortEngine.

◆ get_port_name()

std::string ARDOUR::JACKAudioBackend::get_port_name ( PortHandle  port) const
virtual

Query port name

Parameters
portPortHandle
Returns
the name of the port referred to by port . If the port does not exist, return an empty string.

Implements ARDOUR::PortEngine.

◆ get_port_property()

int ARDOUR::JACKAudioBackend::get_port_property ( PortHandle  ,
const std::string &  key,
std::string &  value,
std::string &  type 
) const
virtual

Return the port-property value and type for a given key. (eg query a human readable port name)

The API follows jack_get_property():

Parameters
keyThe key of the property to retrieve
valueSet to the value of the property if found
typeThe type of the property if set ( Type of data, either a MIME type or URI. If type is empty, the data is assumed to be a UTF-8 encoded string.
Returns
0 on success, -1 if the subject has no key property.

for available keys, see https://github.com/jackaudio/headers/blob/master/metadata.h https://github.com/drobilla/jackey/blob/master/jackey.h

Reimplemented from ARDOUR::PortEngine.

◆ get_ports()

int ARDOUR::JACKAudioBackend::get_ports ( const std::string &  port_name_pattern,
DataType  type,
PortFlags  flags,
std::vector< std::string > &  ports 
) const
virtual

Find the set of ports whose names, types and flags match specified values, place the names of each port into ports .

Parameters
port_name_patternmatch by given pattern. To avoid selecting by name, pass an empty string.
typefilter by given type; pass DataType::NIL to match all types.
flagsfilter by flags, pass PortFlags (0) to avoid selecting by flags.
portsarray filled with matching port-names
Returns
the count of the number found

Implements ARDOUR::PortEngine.

◆ get_sync_offset()

bool ARDOUR::JACKAudioBackend::get_sync_offset ( pframes_t offset) const
virtual

Return true if it possible to determine the offset in samples of the first video frame that starts within the current buffer process cycle, measured from the first sample of the cycle. If returning true, set offset to that offset.

Eg. if it can be determined that the first video frame within the cycle starts 28 samples after the first sample of the cycle, then this method should return true and set offset to 28.

May be impossible to support outside of JACK, which has specific support (in some cases, hardware support) for this feature.

Can ONLY be called from within a process() callback tree (which implies that it can only be called by a process thread)

Reimplemented from ARDOUR::AudioBackend.

◆ in_process_thread()

bool ARDOUR::JACKAudioBackend::in_process_thread ( )
virtual

Return true if execution context is in a backend thread

Implements ARDOUR::AudioBackend.

◆ interleaved()

bool ARDOUR::JACKAudioBackend::interleaved ( ) const
virtual

Implements ARDOUR::AudioBackend.

◆ is_jack()

bool ARDOUR::JACKAudioBackend::is_jack ( ) const
inlinevirtual

Return true if the backed is JACK

Reimplemented from ARDOUR::AudioBackend.

Definition at line 63 of file jack_audiobackend.h.

◆ is_realtime()

bool ARDOUR::JACKAudioBackend::is_realtime ( ) const
virtual

Return true if the callback from the underlying mechanism/API (CoreAudio, JACK, ASIO etc.) occurs in a thread subject to realtime constraints. Return false otherwise.

Implements ARDOUR::AudioBackend.

◆ jack_bufsize_callback()

int ARDOUR::JACKAudioBackend::jack_bufsize_callback ( pframes_t  )
private

◆ jack_latency_callback()

void ARDOUR::JACKAudioBackend::jack_latency_callback ( jack_latency_callback_mode_t  )
private

◆ jack_registration_callback()

void ARDOUR::JACKAudioBackend::jack_registration_callback ( jack_port_id_t  ,
int   
)
private

◆ jack_sample_rate_callback()

int ARDOUR::JACKAudioBackend::jack_sample_rate_callback ( pframes_t  )
private

◆ jack_sync_callback()

int ARDOUR::JACKAudioBackend::jack_sync_callback ( jack_transport_state_t  ,
jack_position_t *   
)
private

◆ jack_timebase_callback()

void ARDOUR::JACKAudioBackend::jack_timebase_callback ( jack_transport_state_t  ,
pframes_t  ,
jack_position_t *  ,
int   
)
private

◆ join_process_threads()

int ARDOUR::JACKAudioBackend::join_process_threads ( )
virtual

Wait for all processing threads to exit.

Return zero on success, non-zero on failure.

Implements ARDOUR::AudioBackend.

◆ launch_control_app()

void ARDOUR::JACKAudioBackend::launch_control_app ( )
virtual

Launch the control app for the currently in-use or selected device. May do nothing if the control app is undefined or cannot be launched.

Implements ARDOUR::AudioBackend.

◆ midi_clear()

void ARDOUR::JACKAudioBackend::midi_clear ( void *  port_buffer)
virtual

Clear the buffer at port_buffer of all MIDI events.

After a call to this method, an immediate, subsequent call to get_midi_event_count with the same port_buffer argument must return zero.

Parameters
port_bufferthe buffer to clear

Implements ARDOUR::PortEngine.

◆ midi_device_enabled()

bool ARDOUR::JACKAudioBackend::midi_device_enabled ( std::string const  ) const
inlinevirtual

query if a midi-device is enabled

Implements ARDOUR::AudioBackend.

Definition at line 177 of file jack_audiobackend.h.

◆ midi_event_get()

int ARDOUR::JACKAudioBackend::midi_event_get ( pframes_t timestamp,
size_t &  size,
uint8_t const **  buf,
void *  port_buffer,
uint32_t  event_index 
)
virtual

Retrieve a MIDI event from the data at port_buffer . The event number to be retrieved is given by event_index (a value of zero indicates that the first event in the port_buffer should be retrieved).

The data associated with the event will be copied into the buffer at buf and the number of bytes written will be stored in size . The timestamp of the event (which is always relative to the start of the current process cycle, in samples) will be stored in timestamp .

Parameters
timestamptime in samples relative to the current cycle start
sizenumber of bytes read into buf
bufraw MIDI data
port_bufferthe midi-port buffer
event_indexindex of event to retrieve
Returns
0 on success, -1 otherwise

Implements ARDOUR::PortEngine.

◆ midi_event_put()

int ARDOUR::JACKAudioBackend::midi_event_put ( void *  port_buffer,
pframes_t  timestamp,
const uint8_t *  buffer,
size_t  size 
)
virtual

Place a MIDI event consisting of size bytes copied from the data at buffer into the port buffer referred to by port_buffer . The MIDI event will be marked with a time given by timestamp .

Events must be added monotonically to a port buffer. An attempt to add a non-monotonic event (e.g. out-of-order) will cause this method to return a failure status.

Parameters
port_bufferthe midi-port buffer
timestamptime in samples relative to the current cycle start
bufferraw MIDI data to emplace
sizenumber of bytes of buffer
Returns
zero on success, non-zero otherwise.

Implements ARDOUR::PortEngine.

◆ midi_option()

std::string ARDOUR::JACKAudioBackend::midi_option ( ) const
virtual

Implements ARDOUR::AudioBackend.

◆ monitoring_input()

bool ARDOUR::JACKAudioBackend::monitoring_input ( PortHandle  port)
virtual

Query status of hardware monitoring for given port

Parameters
portPortHandle to test
Returns
true if input monitoring is enabled for the hardware channel represented by the port referred to by port . Return false otherwise.

Implements ARDOUR::PortEngine.

◆ my_name()

const std::string& ARDOUR::JACKAudioBackend::my_name ( ) const
virtual

Return the name of this process as used by the port manager when naming ports.

Implements ARDOUR::PortEngine.

◆ n_physical()

ChanCount ARDOUR::JACKAudioBackend::n_physical ( unsigned long  flags) const
private

◆ n_physical_inputs()

ChanCount ARDOUR::JACKAudioBackend::n_physical_inputs ( ) const
virtual
Returns
the total count (possibly mixed between different data types) of the number of ports with the IsPhysical and IsInput flags set.

Implements ARDOUR::PortEngine.

◆ n_physical_outputs()

ChanCount ARDOUR::JACKAudioBackend::n_physical_outputs ( ) const
virtual
Returns
the total count (possibly mixed between different data types) of the number of ports with the IsPhysical and IsOutput flags set.

Implements ARDOUR::PortEngine.

◆ name()

std::string ARDOUR::JACKAudioBackend::name ( ) const
virtual

Return the name of this backend.

Should use a well-known, unique term. Expected examples might include "JACK", "CoreAudio", "ASIO" etc.

Implements ARDOUR::AudioBackend.

◆ period_size()

uint32_t ARDOUR::JACKAudioBackend::period_size ( ) const
virtual

Reimplemented from ARDOUR::AudioBackend.

◆ physically_connected()

bool ARDOUR::JACKAudioBackend::physically_connected ( PortHandle  port,
bool  process_callback_safe 
)
virtual

Test if given port is connected to physical I/O ports.

Parameters
portPortHandle of source port to test
process_callback_safetrue if this method is not called from rt-context of backend callbacks
Returns
true if the port referred to by port has any connections to ports marked with the PortFlag IsPhysical. Return false otherwise.

Implements ARDOUR::PortEngine.

◆ port_data_type()

DataType ARDOUR::JACKAudioBackend::port_data_type ( PortHandle  port) const
virtual

Lookup data type of a port

Parameters
portPortHandle of the port to lookup.
Returns
the Ardour data type handled by the port referred to by port . DataType::NIL is returned if the port does not exist.

Implements ARDOUR::PortEngine.

◆ port_is_physical()

bool ARDOUR::JACKAudioBackend::port_is_physical ( PortHandle  port) const
virtual

Return true if the port referred to by port has the IsPhysical flag set. Return false otherwise.

Parameters
portPortHandle to query

Implements ARDOUR::PortEngine.

◆ port_name_size()

uint32_t ARDOUR::JACKAudioBackend::port_name_size ( ) const
virtual

Return the maximum size of a port name

Implements ARDOUR::PortEngine.

◆ private_handle()

void* ARDOUR::JACKAudioBackend::private_handle ( ) const
virtual

Return a private, type-free pointer to any data that might be useful to a concrete implementation

Implements ARDOUR::PortEngine.

◆ process_callback()

int ARDOUR::JACKAudioBackend::process_callback ( pframes_t  nframes)
private

◆ process_thread()

void* ARDOUR::JACKAudioBackend::process_thread ( )
private

◆ process_thread_count()

uint32_t ARDOUR::JACKAudioBackend::process_thread_count ( )
virtual

Return number of processing threads

Implements ARDOUR::AudioBackend.

◆ raw_buffer_size()

size_t ARDOUR::JACKAudioBackend::raw_buffer_size ( DataType  t)
virtual

Implements ARDOUR::AudioBackend.

◆ reconnect_to_jack()

int ARDOUR::JACKAudioBackend::reconnect_to_jack ( )
private

◆ register_port()

PortPtr ARDOUR::JACKAudioBackend::register_port ( const std::string &  shortname,
ARDOUR::DataType  type,
ARDOUR::PortFlags  flags 
)
virtual

Create a new port whose fullname will be the conjunction of my_name(), ":" and shortname . The port will handle data specified by type and will have the flags given by flags . If successful,

Parameters
shortnameName of port to create
typetype of port to create
flagsflags of the port to create
Returns
a reference to the port, otherwise return a null pointer.

Implements ARDOUR::PortEngine.

◆ request_input_monitoring()

int ARDOUR::JACKAudioBackend::request_input_monitoring ( PortHandle  port,
bool  yn 
)
virtual

Increment or decrement the number of requests to monitor the input of the hardware channel represented by the port referred to by port .

If the number of requests rises above zero, input monitoring will be enabled (if can_monitor_input() returns true for the implementation).

If the number of requests falls to zero, input monitoring will be disabled (if can_monitor_input() returns true for the implementation)

Parameters
portPortHandle
yntrue to enable hardware monitoring, false to disable
Returns
0 on success, -1 otherwise

Implements ARDOUR::PortEngine.

◆ requires_driver_selection()

bool ARDOUR::JACKAudioBackend::requires_driver_selection ( ) const
virtual

Return true if this backend requires the selection of a "driver" before any device can be selected. Return false otherwise.

Intended mainly to differentiate between meta-APIs like JACK which can still expose different backends (such as ALSA or CoreAudio or FFADO or netjack) and those like ASIO or CoreAudio which do not.

Reimplemented from ARDOUR::AudioBackend.

◆ reset_device()

int ARDOUR::JACKAudioBackend::reset_device ( )
virtual

Reset device.

Return zero if successful, negative values on error

Implements ARDOUR::AudioBackend.

◆ sample_rate()

float ARDOUR::JACKAudioBackend::sample_rate ( ) const
virtual

Implements ARDOUR::AudioBackend.

◆ sample_time()

samplepos_t ARDOUR::JACKAudioBackend::sample_time ( )
virtual

return the time according to the sample clock in use, measured in samples since an arbitrary zero time in the past. The value should increase monotonically and linearly, without interruption from any source (including CPU frequency scaling).

It is extremely likely that any implementation will use a DLL, since this function can be called from any thread, at any time, and must be able to accurately determine the correct sample time.

Can be called from any thread.

Implements ARDOUR::AudioBackend.

◆ sample_time_at_cycle_start()

samplepos_t ARDOUR::JACKAudioBackend::sample_time_at_cycle_start ( )
virtual

Return the time according to the sample clock in use when the most recent buffer process cycle began. Can be called from any thread.

Implements ARDOUR::AudioBackend.

◆ samples_since_cycle_start()

pframes_t ARDOUR::JACKAudioBackend::samples_since_cycle_start ( )
virtual

Return the time since the current buffer process cycle started, in samples, according to the sample clock in use.

Can ONLY be called from within a process() callback tree (which implies that it can only be called by a process thread)

Implements ARDOUR::AudioBackend.

◆ set_buffer_size()

int ARDOUR::JACKAudioBackend::set_buffer_size ( uint32_t  )
virtual

Set the buffer size to be used.

The device is assumed to use a double buffering scheme, so that one buffer's worth of data can be processed by hardware while software works on the other buffer. All known suitable audio APIs support this model (though ALSA allows for alternate numbers of buffers, and CoreAudio doesn't directly expose the concept).

Implements ARDOUR::AudioBackend.

◆ set_device_name()

int ARDOUR::JACKAudioBackend::set_device_name ( const std::string &  )
virtual

Set the name of the device to be used

Implements ARDOUR::AudioBackend.

◆ set_driver()

int ARDOUR::JACKAudioBackend::set_driver ( const std::string &  drivername)
virtual

Returns zero if the backend can successfully use drivername as the driver, non-zero otherwise.

Should not be used unless the backend returns true from requires_driver_selection()

Reimplemented from ARDOUR::AudioBackend.

◆ set_interleaved()

int ARDOUR::JACKAudioBackend::set_interleaved ( bool  yn)
virtual

Set the preferred underlying hardware data layout. If yn is true, then the hardware will interleave samples for successive channels; otherwise, the hardware will store samples for a single channel contiguously.

Setting this does not change the fact that all data streams to and from Ports are mono (essentially, non-interleaved)

Implements ARDOUR::AudioBackend.

◆ set_jack_callbacks()

void ARDOUR::JACKAudioBackend::set_jack_callbacks ( )
private

◆ set_latency_range()

void ARDOUR::JACKAudioBackend::set_latency_range ( PortHandle  port,
bool  for_playback,
LatencyRange  r 
)
virtual

Set the latency range for the port referred to by port to r . The playback range will be set if for_playback is true, otherwise the capture range will be set.

Parameters
portPortHandle to operate on
for_playbackWhen true, playback latency is set: How long will it be until the signal arrives at the edge of the process graph. When false the capture latency is set: ow long has it been since the signal arrived at the edge of the process graph.
rmin/max latency for given port.

Implements ARDOUR::PortEngine.

◆ set_midi_device_enabled()

int ARDOUR::JACKAudioBackend::set_midi_device_enabled ( std::string const  ,
bool   
)
inlinevirtual

mark a midi-devices as enabled

Implements ARDOUR::AudioBackend.

Definition at line 174 of file jack_audiobackend.h.

◆ set_midi_option()

int ARDOUR::JACKAudioBackend::set_midi_option ( const std::string &  )
virtual

Implements ARDOUR::AudioBackend.

◆ set_peridod_size()

int ARDOUR::JACKAudioBackend::set_peridod_size ( uint32_t  )
virtual

Set the period size to be used. must be called before starting the backend.

Reimplemented from ARDOUR::AudioBackend.

◆ set_port_name()

int ARDOUR::JACKAudioBackend::set_port_name ( PortHandle  port,
const std::string &  name 
)
virtual

Set/rename port

Parameters
portPortHandle to operate on
namenew name to use for this port
Returns
zero if successful, non-zero otherwise

Implements ARDOUR::PortEngine.

◆ set_port_property()

int ARDOUR::JACKAudioBackend::set_port_property ( PortHandle  ,
const std::string &  key,
const std::string &  value,
const std::string &  type 
)
virtual

Set the port-property value and type for a given key

The API follows jack_set_property():

Parameters
keyThe key of the property.
valueThe value of the property.
typeThe type of the property.
Returns
0 on success, -1 on error

Reimplemented from ARDOUR::PortEngine.

◆ set_sample_rate()

int ARDOUR::JACKAudioBackend::set_sample_rate ( float  )
virtual

Set the sample rate to be used

Implements ARDOUR::AudioBackend.

◆ set_systemic_input_latency()

int ARDOUR::JACKAudioBackend::set_systemic_input_latency ( uint32_t  )
virtual

Set the (additional) input latency that cannot be determined via the implementation's underlying code (e.g. latency from external D-A/D-A converters. Units are samples.

Implements ARDOUR::AudioBackend.

◆ set_systemic_midi_input_latency()

int ARDOUR::JACKAudioBackend::set_systemic_midi_input_latency ( std::string const  ,
uint32_t   
)
inlinevirtual

Set the (additional) input latency for a specific midi device, or if the identifier is empty, apply to all midi devices.

Implements ARDOUR::AudioBackend.

Definition at line 85 of file jack_audiobackend.h.

◆ set_systemic_midi_output_latency()

int ARDOUR::JACKAudioBackend::set_systemic_midi_output_latency ( std::string const  ,
uint32_t   
)
inlinevirtual

Set the (additional) output latency for a specific midi device, or if the identifier is empty, apply to all midi devices.

Implements ARDOUR::AudioBackend.

Definition at line 86 of file jack_audiobackend.h.

◆ set_systemic_output_latency()

int ARDOUR::JACKAudioBackend::set_systemic_output_latency ( uint32_t  )
virtual

Set the (additional) output latency that cannot be determined via the implementation's underlying code (e.g. latency from external D-A/D-A converters. Units are samples.

Implements ARDOUR::AudioBackend.

◆ set_time_master()

int ARDOUR::JACKAudioBackend::set_time_master ( bool  yn)
virtual

If yn is true, become the time master for any inter-application transport timebase, otherwise cease to be the time master for the same.

Return zero on success, non-zero otherwise

JACK is the only currently known audio API with the concept of a shared transport timebase.

Reimplemented from ARDOUR::AudioBackend.

◆ setup_jack_startup_command()

void ARDOUR::JACKAudioBackend::setup_jack_startup_command ( bool  for_latency_measurement)
private

◆ speed_and_position()

bool ARDOUR::JACKAudioBackend::speed_and_position ( double &  speed,
samplepos_t position 
)
virtual

Set speed and position to the current speed and position indicated by some transport sync signal. Return whether the current transport state is pending, or finalized.

Derived classes only need implement this if they provide some way to sync to a transport sync signal (e.g. Sony 9 Pin) that is not handled by Ardour itself (LTC and MTC are both handled by Ardour). The canonical example is JACK Transport.

Reimplemented from ARDOUR::AudioBackend.

◆ stop()

int ARDOUR::JACKAudioBackend::stop ( )
virtual

Stop using the device currently in use.

If the function is successfully called, no subsequent calls to the process_callback() of engine will be made after the function returns, until parameters are reset and start() are called again.

The backend is considered to be un-configured after a successful return, and requires calls to set hardware parameters before it can be start()-ed again. See pause() for a way to avoid this. stop() should only be used when reconfiguration is required OR when there are no plans to use the backend in the future with a reconfiguration.

Return zero if successful, 1 if the device is not in use, negative values on error

Implements ARDOUR::AudioBackend.

◆ systemic_input_latency()

uint32_t ARDOUR::JACKAudioBackend::systemic_input_latency ( ) const
virtual

Implements ARDOUR::AudioBackend.

◆ systemic_midi_input_latency()

uint32_t ARDOUR::JACKAudioBackend::systemic_midi_input_latency ( std::string const  ) const
inlinevirtual

Implements ARDOUR::AudioBackend.

Definition at line 97 of file jack_audiobackend.h.

◆ systemic_midi_output_latency()

uint32_t ARDOUR::JACKAudioBackend::systemic_midi_output_latency ( std::string const  ) const
inlinevirtual

Implements ARDOUR::AudioBackend.

Definition at line 98 of file jack_audiobackend.h.

◆ systemic_output_latency()

uint32_t ARDOUR::JACKAudioBackend::systemic_output_latency ( ) const
virtual

Implements ARDOUR::AudioBackend.

◆ transport_locate()

void ARDOUR::JACKAudioBackend::transport_locate ( samplepos_t  pos)
virtual

Attempt to locate the transport to pos

Reimplemented from ARDOUR::AudioBackend.

◆ transport_sample()

samplepos_t ARDOUR::JACKAudioBackend::transport_sample ( ) const
virtual

Return the current transport location, in samples measured from the origin (defined by the transport time master)

Reimplemented from ARDOUR::AudioBackend.

◆ transport_start()

void ARDOUR::JACKAudioBackend::transport_start ( )
virtual

Attempt to change the transport state to TransportRolling.

Reimplemented from ARDOUR::AudioBackend.

◆ transport_state()

TransportState ARDOUR::JACKAudioBackend::transport_state ( ) const
virtual

return the current transport state

Reimplemented from ARDOUR::AudioBackend.

◆ transport_stop()

void ARDOUR::JACKAudioBackend::transport_stop ( )
virtual

Attempt to change the transport state to TransportStopped.

Reimplemented from ARDOUR::AudioBackend.

◆ unregister_port()

void ARDOUR::JACKAudioBackend::unregister_port ( PortHandle  )
virtual

Implements ARDOUR::PortEngine.

◆ update_latencies()

void ARDOUR::JACKAudioBackend::update_latencies ( )
virtual

Implements ARDOUR::AudioBackend.

◆ when_connected_to_jack()

void ARDOUR::JACKAudioBackend::when_connected_to_jack ( )
private

Member Data Documentation

◆ _current_buffer_size

uint32_t ARDOUR::JACKAudioBackend::_current_buffer_size
private

Definition at line 285 of file jack_audiobackend.h.

◆ _current_sample_rate

uint32_t ARDOUR::JACKAudioBackend::_current_sample_rate
private

Definition at line 284 of file jack_audiobackend.h.

◆ _freewheeling

bool ARDOUR::JACKAudioBackend::_freewheeling
private

Definition at line 227 of file jack_audiobackend.h.

◆ _jack_connection

std::shared_ptr<JackConnection> ARDOUR::JACKAudioBackend::_jack_connection
private

Definition at line 225 of file jack_audiobackend.h.

◆ _jack_ports

SerializedRCUManager<JackPorts> ARDOUR::JACKAudioBackend::_jack_ports
mutableprivate

Definition at line 307 of file jack_audiobackend.h.

◆ _jack_threads

std::vector<jack_native_thread_t> ARDOUR::JACKAudioBackend::_jack_threads
private

Definition at line 230 of file jack_audiobackend.h.

◆ _main_thread

jack_native_thread_t ARDOUR::JACKAudioBackend::_main_thread
private

Definition at line 231 of file jack_audiobackend.h.

◆ _raw_buffer_sizes

std::map<DataType,size_t> ARDOUR::JACKAudioBackend::_raw_buffer_sizes
private

Definition at line 228 of file jack_audiobackend.h.

◆ _running

bool ARDOUR::JACKAudioBackend::_running
private

Definition at line 226 of file jack_audiobackend.h.

◆ _session

JACKSession* ARDOUR::JACKAudioBackend::_session
private

Definition at line 321 of file jack_audiobackend.h.

◆ _target_buffer_size

uint32_t ARDOUR::JACKAudioBackend::_target_buffer_size
private

Definition at line 276 of file jack_audiobackend.h.

◆ _target_device

std::string ARDOUR::JACKAudioBackend::_target_device
private

Definition at line 274 of file jack_audiobackend.h.

◆ _target_driver

std::string ARDOUR::JACKAudioBackend::_target_driver
private

Definition at line 273 of file jack_audiobackend.h.

◆ _target_input_channels

uint32_t ARDOUR::JACKAudioBackend::_target_input_channels
private

Definition at line 280 of file jack_audiobackend.h.

◆ _target_interleaved

bool ARDOUR::JACKAudioBackend::_target_interleaved
private

Definition at line 279 of file jack_audiobackend.h.

◆ _target_midi_option

std::string ARDOUR::JACKAudioBackend::_target_midi_option
private

Definition at line 286 of file jack_audiobackend.h.

◆ _target_num_periods

uint32_t ARDOUR::JACKAudioBackend::_target_num_periods
private

Definition at line 277 of file jack_audiobackend.h.

◆ _target_output_channels

uint32_t ARDOUR::JACKAudioBackend::_target_output_channels
private

Definition at line 281 of file jack_audiobackend.h.

◆ _target_sample_format

SampleFormat ARDOUR::JACKAudioBackend::_target_sample_format
private

Definition at line 278 of file jack_audiobackend.h.

◆ _target_sample_rate

float ARDOUR::JACKAudioBackend::_target_sample_rate
private

Definition at line 275 of file jack_audiobackend.h.

◆ _target_systemic_input_latency

uint32_t ARDOUR::JACKAudioBackend::_target_systemic_input_latency
private

Definition at line 282 of file jack_audiobackend.h.

◆ _target_systemic_output_latency

uint32_t ARDOUR::JACKAudioBackend::_target_systemic_output_latency
private

Definition at line 283 of file jack_audiobackend.h.

◆ all_devices

DriverDeviceMap ARDOUR::JACKAudioBackend::all_devices
mutableprivate

Definition at line 291 of file jack_audiobackend.h.

◆ disconnect_connection

PBD::ScopedConnection ARDOUR::JACKAudioBackend::disconnect_connection
private

Definition at line 293 of file jack_audiobackend.h.

◆ jack_connection_connection

PBD::ScopedConnection ARDOUR::JACKAudioBackend::jack_connection_connection
private

Definition at line 315 of file jack_audiobackend.h.

◆ server_call_mutex

Glib::Threads::Mutex ARDOUR::JACKAudioBackend::server_call_mutex
mutableprivate

Definition at line 323 of file jack_audiobackend.h.


The documentation for this class was generated from the following file: