35 #ifdef ARDOURBACKEND_DLL_EXPORTS
36 # define ARDOURBACKEND_API LIBARDOUR_DLL_EXPORT
38 # define ARDOURBACKEND_API LIBARDOUR_DLL_IMPORT
40 #define ARDOURBACKEND_LOCAL LIBARDOUR_DLL_LOCAL
51 int (*instantiate) (
const std::string& arg1,
const std::string& arg2);
54 int (*deinstantiate) (void);
61 std::shared_ptr<AudioBackend> (*factory) (
AudioEngine&);
70 bool (*already_configured) ();
97 BackendInitializationError = -64,
154 virtual std::string
name ()
const = 0;
163 virtual bool is_jack ()
const {
return false; }
191 return std::vector<std::string> ();
260 return std::vector<DeviceStatus> ();
272 return std::vector<DeviceStatus> ();
288 return std::vector<uint32_t> ();
357 std::vector<float> input_sizes = available_sample_rates (input_device);
358 std::vector<float> output_sizes = available_sample_rates (output_device);
359 std::vector<float> rv;
360 std::set_union (input_sizes.begin (), input_sizes.end (),
361 output_sizes.begin (), output_sizes.end (),
362 std::back_inserter (rv));
390 virtual std::vector<uint32_t>
available_buffer_sizes2 (
const std::string& input_device,
const std::string& output_device)
const
392 std::vector<uint32_t> input_rates = available_buffer_sizes (input_device);
393 std::vector<uint32_t> output_rates = available_buffer_sizes (output_device);
394 std::vector<uint32_t> rv;
395 std::set_union (input_rates.begin (), input_rates.end (),
396 output_rates.begin (), output_rates.end (),
397 std::back_inserter (rv));
525 return std::string ();
530 return std::string ();
548 return std::string ();
626 int start (
bool for_latency_measurement =
false)
628 return _start (for_latency_measurement);
726 return 1000000 * (buffer_size () / sample_rate ());
837 virtual int _start (
bool for_latency_measurement) = 0;
virtual samplepos_t transport_sample() const
virtual void update_latencies()=0
virtual std::string output_device_name() const
virtual bool interleaved() const =0
virtual int set_systemic_midi_input_latency(std::string const, uint32_t)=0
virtual int create_process_thread(std::function< void()> func)=0
virtual int set_sample_rate(float)=0
virtual int _start(bool for_latency_measurement)=0
static std::string get_standard_device_name(StandardDeviceName)
virtual bool match_input_output_devices_or_none() const
virtual void launch_control_app()=0
virtual int set_time_master(bool yn)
virtual bool is_realtime() const =0
virtual int client_real_time_priority()
virtual pframes_t samples_since_cycle_start()=0
virtual uint32_t buffer_size() const =0
virtual uint32_t default_buffer_size(const std::string &device) const
virtual int freewheel(bool start_stop)=0
virtual std::vector< uint32_t > available_buffer_sizes(const std::string &device) const =0
virtual std::vector< uint32_t > available_period_sizes(const std::string &driver, const std::string &device) const
virtual std::vector< uint32_t > available_buffer_sizes2(const std::string &input_device, const std::string &output_device) const
virtual float dsp_load() const =0
virtual std::string control_app_name() const =0
virtual std::vector< std::string > enumerate_midi_options() const =0
virtual std::string name() const =0
virtual bool can_change_sample_rate_when_running() const =0
virtual int set_input_device_name(const std::string &)
virtual std::string input_device_name() const
virtual uint32_t systemic_input_latency() const =0
virtual bool speed_and_position(double &speed, samplepos_t &position)
virtual int set_systemic_midi_output_latency(std::string const, uint32_t)=0
virtual std::string midi_option() const =0
virtual int set_peridod_size(uint32_t)
virtual int set_interleaved(bool yn)=0
virtual void transport_stop()
virtual uint32_t process_thread_count()=0
virtual bool is_jack() const
virtual int set_systemic_input_latency(uint32_t)=0
AudioBackend(AudioEngine &e, AudioBackendInfo &i)
virtual TransportState transport_state() const
virtual bool update_devices()
virtual float sample_rate() const =0
virtual std::vector< DeviceStatus > enumerate_input_devices() const
virtual size_t raw_buffer_size(DataType t)=0
virtual uint32_t systemic_midi_output_latency(std::string const) const =0
virtual samplepos_t sample_time_at_cycle_start()=0
virtual bool requires_driver_selection() const
virtual int set_output_device_name(const std::string &)
virtual int drop_device()
virtual std::vector< std::string > enumerate_drivers() const
virtual std::vector< DeviceStatus > enumerate_output_devices() const
@ ProcessThreadStartError
@ FreewheelThreadStartError
@ MidiDeviceNotAvailableError
@ AudioDeviceNotConnectedError
@ RequestedInputLatencyNotSupportedError
@ DeviceConfigurationNotSupportedError
@ AudioDeviceReservationError
@ PeriodCountNotSupportedError
@ SampleRateNotSupportedError
@ SettingMIDIThreadPriorityError
@ InputChannelCountNotSupportedError
@ ChannelCountNotSupportedError
@ AquireRealtimePermissionError
@ AudioDeviceNotAvailableError
@ RequestedOutputLatencyNotSupportedError
@ SettingAudioThreadPriorityError
@ SampleFormatNotSupportedError
@ AudioDeviceInvalidError
@ BackendDeinitializationError
@ BackendReinitializationError
@ MidiDeviceNotConnectedError
@ OutputChannelCountNotSupportedError
@ PeriodSizeNotSupportedError
virtual uint32_t period_size() const
virtual bool use_separate_input_and_output_devices() const
virtual bool midi_device_enabled(std::string const) const =0
virtual std::vector< float > available_sample_rates2(const std::string &input_device, const std::string &output_device) const
static size_t thread_stack_size()
virtual std::string driver_name() const
virtual void transport_start()
virtual int usecs_per_cycle() const
virtual bool in_process_thread()=0
virtual void transport_locate(samplepos_t pos)
virtual bool can_set_systemic_midi_latencies() const =0
virtual bool can_change_systemic_latency_when_running() const
virtual int set_midi_option(const std::string &option)=0
virtual std::string device_name() const =0
AudioBackendInfo & info() const
virtual float default_sample_rate() const
virtual bool can_request_update_devices()
virtual int set_device_name(const std::string &)=0
virtual int set_midi_device_enabled(std::string const, bool)=0
virtual int set_driver(const std::string &drivername)
virtual bool get_use_buffered_io()
virtual std::vector< DeviceStatus > enumerate_devices() const =0
virtual int reset_device()=0
virtual samplepos_t sample_time()=0
int start(bool for_latency_measurement=false)
virtual bool can_measure_systemic_latency() const =0
virtual uint32_t systemic_midi_input_latency(std::string const) const =0
virtual std::vector< DeviceStatus > enumerate_midi_devices() const =0
virtual bool can_use_buffered_io()
static std::string get_error_string(ErrorCode)
virtual int set_systemic_output_latency(uint32_t)=0
virtual bool can_change_buffer_size_when_running() const =0
virtual std::vector< float > available_sample_rates(const std::string &device) const =0
virtual int join_process_threads()=0
virtual int set_buffer_size(uint32_t)=0
virtual bool can_set_period_size() const
virtual uint32_t systemic_output_latency() const =0
virtual bool get_sync_offset(pframes_t &offset) const
virtual void set_use_buffered_io(bool)
GtkImageIconNameData name
Temporal::samplepos_t samplepos_t
DeviceStatus(const std::string &s, bool avail)