Ardour
9.0-pre0-582-g084a23a80d
|
#include <audioengine.h>
Classes | |
class | NoBackendAvailable |
Public Types | |
enum | LatencyMeasurement { MeasureNone , MeasureAudio , MeasureMIDI } |
enum | TimingTypes { ProcessCallback = 0 , NTT = 1 } |
Public Types inherited from ARDOUR::PortManager | |
typedef std::map< std::string, std::shared_ptr< Port >, SortByPortName > | Ports |
typedef std::list< std::shared_ptr< Port > > | PortList |
typedef std::shared_ptr< CircularSampleBuffer > | AudioPortScope |
typedef std::shared_ptr< CircularEventBuffer > | MIDIPortMonitor |
typedef std::shared_ptr< DPM > | AudioPortMeter |
typedef std::shared_ptr< MPM > | MIDIPortMeter |
typedef std::map< std::string, AudioInputPort, SortByPortName > | AudioInputPorts |
typedef std::map< std::string, MIDIInputPort, SortByPortName > | MIDIInputPorts |
Public Member Functions | |
virtual | ~AudioEngine () |
int | discover_backends () |
std::vector< const AudioBackendInfo * > | available_backends () const |
std::string | current_backend_name () const |
std::shared_ptr< AudioBackend > | set_backend (const std::string &, const std::string &arg1, const std::string &arg2) |
std::shared_ptr< AudioBackend > | current_backend () const |
bool | setup_required () const |
bool | is_jack () const |
ProcessThread * | main_thread () const |
int | start (bool for_latency_measurement=false) |
int | stop (bool for_latency_measurement=false) |
int | freewheel (bool start_stop) |
float | get_dsp_load () const |
void | transport_start () |
void | transport_stop () |
TransportState | transport_state () |
void | transport_locate (samplepos_t pos) |
samplepos_t | transport_sample () |
samplecnt_t | sample_rate () const |
pframes_t | samples_per_cycle () const |
int | usecs_per_cycle () const |
size_t | raw_buffer_size (DataType t) |
samplepos_t | sample_time () |
samplepos_t | sample_time_at_cycle_start () |
pframes_t | samples_since_cycle_start () |
bool | get_sync_offset (pframes_t &offset) const |
std::string | get_last_backend_error () const |
int | create_process_thread (std::function< void()> func) |
int | join_process_threads () |
bool | in_process_thread () |
uint32_t | process_thread_count () |
int | backend_reset_requested () |
void | request_backend_reset () |
void | request_device_list_update () |
void | launch_device_control_app () |
bool | is_reset_requested () const |
int | set_device_name (const std::string &) |
int | set_sample_rate (float) |
int | set_buffer_size (uint32_t) |
int | set_interleaved (bool yn) |
int | set_systemic_input_latency (uint32_t) |
int | set_systemic_output_latency (uint32_t) |
bool | freewheeling () const |
bool | running () const |
std::string | backend_id (bool for_input) |
Glib::Threads::Mutex & | process_lock () |
Glib::Threads::Mutex & | latency_lock () |
int | request_buffer_size (pframes_t samples) |
samplecnt_t | processed_samples () const |
void | set_session (Session *) |
void | remove_session () |
Session * | session () const |
void | split_cycle (pframes_t offset) |
int | reset_timebase () |
void | update_latencies () |
void | died () |
int | process_callback (pframes_t nframes) |
int | buffer_size_change (pframes_t nframes) |
int | sample_rate_change (pframes_t nframes) |
void | freewheel_callback (bool) |
void | timebase_callback (TransportState state, pframes_t nframes, samplepos_t pos, int new_position) |
int | sync_callback (TransportState state, samplepos_t position) |
int | port_registration_callback () |
void | latency_callback (bool for_playback) |
void | halted_callback (const char *reason) |
MTDM * | mtdm () |
MIDIDM * | mididm () |
int | prepare_for_latency_measurement () |
int | start_latency_detection (bool) |
void | stop_latency_detection () |
void | set_latency_input_port (const std::string &) |
void | set_latency_output_port (const std::string &) |
uint32_t | latency_signal_delay () const |
LatencyMeasurement | measuring_latency () const |
void | reset_silence_countdown () |
void | add_pending_port_deletion (Port *) |
void | queue_latency_update (bool) |
Public Member Functions inherited from ARDOUR::PortManager | |
PortManager () | |
virtual | ~PortManager () |
PortEngine & | port_engine () |
uint32_t | port_name_size () const |
std::string | my_name () const |
size_t | total_port_count () const |
size_t | session_port_count () const |
void | list_cycle_ports () const |
void | list_all_ports () const |
std::shared_ptr< Port > | register_input_port (DataType, const std::string &portname, bool async=false, PortFlags extra_flags=PortFlags(0)) |
std::shared_ptr< Port > | register_output_port (DataType, const std::string &portname, bool async=false, PortFlags extra_flags=PortFlags(0)) |
int | unregister_port (std::shared_ptr< Port >) |
int | connect (const std::string &source, const std::string &destination) |
int | disconnect (const std::string &source, const std::string &destination) |
int | disconnect (std::shared_ptr< Port >) |
int | disconnect (std::string const &) |
int | reestablish_ports () |
int | reconnect_ports () |
bool | connected (const std::string &) |
bool | physically_connected (const std::string &) |
int | get_connections (const std::string &, std::vector< std::string > &, bool process_context_safe=true) |
std::shared_ptr< Port > | get_port_by_name (const std::string &) |
void | port_renamed (const std::string &, const std::string &) |
std::string | make_port_name_relative (const std::string &name) const |
std::string | make_port_name_non_relative (const std::string &name) const |
std::string | get_pretty_name_by_name (const std::string &portname) const |
std::string | get_hardware_port_name_by_name (const std::string &portname) const |
std::string | short_port_name_from_port_name (std::string const &full_name) const |
bool | port_is_mine (const std::string &fullname) const |
bool | port_is_physical (const std::string &) const |
void | get_physical_outputs (DataType type, std::vector< std::string > &, MidiPortFlags include=MidiPortFlags(0), MidiPortFlags exclude=MidiPortFlags(0)) |
void | get_physical_inputs (DataType type, std::vector< std::string > &, MidiPortFlags include=MidiPortFlags(0), MidiPortFlags exclude=MidiPortFlags(0)) |
ChanCount | n_physical_outputs () const |
ChanCount | n_physical_inputs () const |
int | get_ports (const std::string &port_name_pattern, DataType type, PortFlags flags, std::vector< std::string > &) |
int | get_ports (DataType, PortList &) |
void | set_port_pretty_name (std::string const &, std::string const &) |
void | remove_session_ports () |
void | reinit (bool with_ratio=false) |
void | clear_pending_port_deletions () |
PBD::RingBuffer< Port * > & | port_deletions_pending () |
bool | check_for_ambiguous_latency (bool log=false) const |
bool | can_request_input_monitoring () const |
void | request_input_monitoring (const std::string &, bool) const |
void | ensure_input_monitoring (const std::string &, bool) const |
void | registration_callback () |
int | graph_order_callback () |
void | connect_callback (const std::string &, const std::string &, bool connection) |
bool | port_remove_in_progress () const |
MidiPortFlags | midi_port_metadata (std::string const &) |
void | get_configurable_midi_ports (std::vector< std::string > &, bool for_input) |
void | get_midi_selection_ports (std::vector< std::string > &) |
void | add_midi_port_flags (std::string const &, MidiPortFlags) |
void | remove_midi_port_flags (std::string const &, MidiPortFlags) |
void | reset_input_meters () |
AudioInputPorts | audio_input_ports () const |
MIDIInputPorts | midi_input_ports () const |
MonitorPort & | monitor_port () |
Public Member Functions inherited from ARDOUR::SessionHandlePtr | |
SessionHandlePtr (ARDOUR::Session *s) | |
SessionHandlePtr () | |
virtual | ~SessionHandlePtr () |
Static Public Member Functions | |
static AudioEngine * | create () |
static AudioEngine * | instance () |
static void | destroy () |
static bool | thread_initialised_for_audio_processing () |
static void | thread_init_callback (void *) |
Static Public Member Functions inherited from ARDOUR::PortManager | |
static void | falloff_cache_calc (pframes_t, samplecnt_t) |
static bool | port_is_virtual_piano (std::string const &) |
static bool | port_is_control_only (std::string const &) |
static bool | port_is_physical_input_monitor_enable (std::string const &) |
Public Attributes | |
PBD::Signal< void(pframes_t)> | Freewheel |
PBD::Signal< void()> | Xrun |
PBD::Signal< void(samplecnt_t)> | SampleRateChanged |
PBD::Signal< void(pframes_t)> | BufferSizeChanged |
PBD::Signal< void()> | DeviceError |
PBD::Signal< void()> | DeviceListChanged |
PBD::Signal< void(const char *)> | Halted |
PBD::Signal< void(uint32_t)> | Running |
PBD::Signal< void()> | Stopped |
PBD::Signal< void()> | DeviceResetStarted |
PBD::Signal< void()> | DeviceResetFinished |
PBD::Signal< void()> | BecameSilent |
PBD::TimingStats | dsp_stats [NTT] |
Public Attributes inherited from ARDOUR::PortManager | |
PBD::Signal< void()> | MidiSelectionPortsChanged |
PBD::Signal< void()> | MidiPortInfoChanged |
PBD::Signal< void(std::string)> | PortPrettyNameChanged |
PBD::Signal< void()> | GraphReordered |
PBD::Signal< void()> | PortRegisteredOrUnregistered |
PBD::Signal< void(std::weak_ptr< Port >, std::string, std::weak_ptr< Port >, std::string, bool)> | PortConnectedOrDisconnected |
PBD::Signal< void(DataType, std::vector< std::string >, bool)> | PhysInputChanged |
Private Types | |
typedef std::map< std::string, AudioBackendInfo * > | BackendMap |
Private Member Functions | |
AudioEngine () | |
void | start_hw_event_processing () |
void | stop_hw_event_processing () |
void | do_reset_backend () |
void | do_devicelist_update () |
AudioBackendInfo * | backend_discover (const std::string &) |
void | drop_backend () |
Static Private Attributes | |
static AudioEngine * | _instance |
Additional Inherited Members | |
Protected Member Functions inherited from ARDOUR::PortManager | |
std::shared_ptr< Port > | register_port (DataType type, const std::string &portname, bool input, bool async=false, PortFlags extra_flags=PortFlags(0)) |
void | port_registration_failure (const std::string &portname) |
void | silence (pframes_t nframes, Session *s=0) |
void | silence_outputs (pframes_t nframes) |
void | check_monitoring () |
void | cycle_start (pframes_t nframes, Session *s=0) |
void | cycle_end (pframes_t nframes, Session *s=0) |
void | cycle_end_fade_out (gain_t, gain_t, pframes_t, Session *s=0) |
void | filter_midi_ports (std::vector< std::string > &, MidiPortFlags, MidiPortFlags) |
void | set_port_buffer_sizes (pframes_t) |
Protected Member Functions inherited from ARDOUR::SessionHandlePtr | |
virtual void | session_going_away () |
Static Protected Member Functions inherited from ARDOUR::PortManager | |
static std::string | port_info_file () |
static std::string | midi_port_info_file () |
Protected Attributes inherited from ARDOUR::PortManager | |
std::shared_ptr< AudioBackend > | _backend |
SerializedRCUManager< Ports > | _ports |
bool | _port_remove_in_progress |
PBD::RingBuffer< Port * > | _port_deletions_pending |
std::shared_ptr< Ports const > | _cycle_ports |
Protected Attributes inherited from ARDOUR::SessionHandlePtr | |
ARDOUR::Session * | _session |
PBD::ScopedConnectionList | _session_connections |
Definition at line 63 of file audioengine.h.
|
private |
Definition at line 317 of file audioengine.h.
Enumerator | |
---|---|
MeasureNone | |
MeasureAudio | |
MeasureMIDI |
Definition at line 230 of file audioengine.h.
Enumerator | |
---|---|
ProcessCallback | |
NTT |
Definition at line 251 of file audioengine.h.
|
virtual |
|
private |
|
virtual |
Implements ARDOUR::PortManager.
std::vector<const AudioBackendInfo*> ARDOUR::AudioEngine::available_backends | ( | ) | const |
|
private |
std::string ARDOUR::AudioEngine::backend_id | ( | bool | for_input | ) |
int ARDOUR::AudioEngine::backend_reset_requested | ( | ) |
int ARDOUR::AudioEngine::buffer_size_change | ( | pframes_t | nframes | ) |
|
static |
int ARDOUR::AudioEngine::create_process_thread | ( | std::function< void()> | func | ) |
|
inline |
Definition at line 75 of file audioengine.h.
std::string ARDOUR::AudioEngine::current_backend_name | ( | ) | const |
|
static |
void ARDOUR::AudioEngine::died | ( | ) |
int ARDOUR::AudioEngine::discover_backends | ( | ) |
|
private |
|
private |
|
private |
int ARDOUR::AudioEngine::freewheel | ( | bool | start_stop | ) |
void ARDOUR::AudioEngine::freewheel_callback | ( | bool | ) |
|
inline |
Definition at line 129 of file audioengine.h.
float ARDOUR::AudioEngine::get_dsp_load | ( | ) | const |
|
inline |
Definition at line 105 of file audioengine.h.
bool ARDOUR::AudioEngine::get_sync_offset | ( | pframes_t & | offset | ) | const |
void ARDOUR::AudioEngine::halted_callback | ( | const char * | reason | ) |
bool ARDOUR::AudioEngine::in_process_thread | ( | ) |
|
inlinestatic |
Definition at line 196 of file audioengine.h.
bool ARDOUR::AudioEngine::is_jack | ( | ) | const |
|
inline |
Definition at line 118 of file audioengine.h.
int ARDOUR::AudioEngine::join_process_threads | ( | ) |
void ARDOUR::AudioEngine::latency_callback | ( | bool | for_playback | ) |
|
inline |
Definition at line 135 of file audioengine.h.
|
inline |
Definition at line 228 of file audioengine.h.
void ARDOUR::AudioEngine::launch_device_control_app | ( | ) |
|
inline |
Definition at line 79 of file audioengine.h.
|
inline |
Definition at line 236 of file audioengine.h.
|
inline |
Definition at line 221 of file audioengine.h.
|
inline |
Definition at line 220 of file audioengine.h.
int ARDOUR::AudioEngine::port_registration_callback | ( | ) |
int ARDOUR::AudioEngine::prepare_for_latency_measurement | ( | ) |
int ARDOUR::AudioEngine::process_callback | ( | pframes_t | nframes | ) |
|
inline |
Definition at line 134 of file audioengine.h.
uint32_t ARDOUR::AudioEngine::process_thread_count | ( | ) |
|
inline |
Definition at line 141 of file audioengine.h.
void ARDOUR::AudioEngine::queue_latency_update | ( | bool | ) |
size_t ARDOUR::AudioEngine::raw_buffer_size | ( | DataType | t | ) |
void ARDOUR::AudioEngine::remove_session | ( | ) |
void ARDOUR::AudioEngine::request_backend_reset | ( | ) |
|
inline |
Definition at line 137 of file audioengine.h.
void ARDOUR::AudioEngine::request_device_list_update | ( | ) |
void ARDOUR::AudioEngine::reset_silence_countdown | ( | ) |
int ARDOUR::AudioEngine::reset_timebase | ( | ) |
|
inline |
Definition at line 130 of file audioengine.h.
samplecnt_t ARDOUR::AudioEngine::sample_rate | ( | ) | const |
int ARDOUR::AudioEngine::sample_rate_change | ( | pframes_t | nframes | ) |
samplepos_t ARDOUR::AudioEngine::sample_time | ( | ) |
samplepos_t ARDOUR::AudioEngine::sample_time_at_cycle_start | ( | ) |
pframes_t ARDOUR::AudioEngine::samples_per_cycle | ( | ) | const |
pframes_t ARDOUR::AudioEngine::samples_since_cycle_start | ( | ) |
|
inlinevirtual |
Reimplemented from ARDOUR::SessionHandlePtr.
Definition at line 145 of file audioengine.h.
std::shared_ptr<AudioBackend> ARDOUR::AudioEngine::set_backend | ( | const std::string & | , |
const std::string & | arg1, | ||
const std::string & | arg2 | ||
) |
int ARDOUR::AudioEngine::set_buffer_size | ( | uint32_t | ) |
int ARDOUR::AudioEngine::set_device_name | ( | const std::string & | ) |
int ARDOUR::AudioEngine::set_interleaved | ( | bool | yn | ) |
void ARDOUR::AudioEngine::set_latency_input_port | ( | const std::string & | ) |
void ARDOUR::AudioEngine::set_latency_output_port | ( | const std::string & | ) |
int ARDOUR::AudioEngine::set_sample_rate | ( | float | ) |
|
virtual |
Reimplemented from ARDOUR::SessionHandlePtr.
int ARDOUR::AudioEngine::set_systemic_input_latency | ( | uint32_t | ) |
int ARDOUR::AudioEngine::set_systemic_output_latency | ( | uint32_t | ) |
bool ARDOUR::AudioEngine::setup_required | ( | ) | const |
void ARDOUR::AudioEngine::split_cycle | ( | pframes_t | offset | ) |
int ARDOUR::AudioEngine::start | ( | bool | for_latency_measurement = false | ) |
|
private |
int ARDOUR::AudioEngine::start_latency_detection | ( | bool | ) |
int ARDOUR::AudioEngine::stop | ( | bool | for_latency_measurement = false | ) |
|
private |
void ARDOUR::AudioEngine::stop_latency_detection | ( | ) |
int ARDOUR::AudioEngine::sync_callback | ( | TransportState | state, |
samplepos_t | position | ||
) |
|
static |
|
static |
void ARDOUR::AudioEngine::timebase_callback | ( | TransportState | state, |
pframes_t | nframes, | ||
samplepos_t | pos, | ||
int | new_position | ||
) |
void ARDOUR::AudioEngine::transport_locate | ( | samplepos_t | pos | ) |
samplepos_t ARDOUR::AudioEngine::transport_sample | ( | ) |
void ARDOUR::AudioEngine::transport_start | ( | ) |
TransportState ARDOUR::AudioEngine::transport_state | ( | ) |
void ARDOUR::AudioEngine::transport_stop | ( | ) |
void ARDOUR::AudioEngine::update_latencies | ( | ) |
int ARDOUR::AudioEngine::usecs_per_cycle | ( | ) | const |
|
private |
Definition at line 318 of file audioengine.h.
|
private |
Definition at line 305 of file audioengine.h.
|
private |
Definition at line 274 of file audioengine.h.
|
private |
Definition at line 304 of file audioengine.h.
|
private |
Definition at line 303 of file audioengine.h.
|
private |
Definition at line 302 of file audioengine.h.
|
private |
Definition at line 299 of file audioengine.h.
|
private |
Definition at line 297 of file audioengine.h.
|
private |
Definition at line 298 of file audioengine.h.
|
private |
Definition at line 293 of file audioengine.h.
|
private |
Definition at line 308 of file audioengine.h.
|
staticprivate |
Definition at line 262 of file audioengine.h.
|
private |
Definition at line 295 of file audioengine.h.
|
private |
Definition at line 287 of file audioengine.h.
|
private |
Definition at line 288 of file audioengine.h.
|
private |
Definition at line 285 of file audioengine.h.
|
private |
Definition at line 265 of file audioengine.h.
|
private |
Definition at line 289 of file audioengine.h.
|
private |
Definition at line 286 of file audioengine.h.
|
private |
Definition at line 290 of file audioengine.h.
|
private |
Definition at line 281 of file audioengine.h.
|
private |
Definition at line 284 of file audioengine.h.
|
private |
Definition at line 283 of file audioengine.h.
|
private |
Definition at line 282 of file audioengine.h.
|
private |
Definition at line 310 of file audioengine.h.
|
private |
Definition at line 309 of file audioengine.h.
|
private |
Definition at line 264 of file audioengine.h.
|
private |
the number of samples processed since start() was called
Definition at line 280 of file audioengine.h.
|
private |
Definition at line 300 of file audioengine.h.
|
private |
Definition at line 273 of file audioengine.h.
|
private |
Definition at line 307 of file audioengine.h.
|
private |
Definition at line 292 of file audioengine.h.
|
private |
Definition at line 266 of file audioengine.h.
|
private |
Definition at line 306 of file audioengine.h.
|
private |
Definition at line 301 of file audioengine.h.
|
private |
Definition at line 291 of file audioengine.h.
PBD::Signal<void()> ARDOUR::AudioEngine::BecameSilent |
Definition at line 245 of file audioengine.h.
PBD::Signal<void(pframes_t)> ARDOUR::AudioEngine::BufferSizeChanged |
this signal is emitted if the buffer size changes
Definition at line 170 of file audioengine.h.
PBD::Signal<void()> ARDOUR::AudioEngine::DeviceError |
this signal is emitted if the device cannot operate properly
Definition at line 173 of file audioengine.h.
PBD::Signal<void()> ARDOUR::AudioEngine::DeviceListChanged |
Definition at line 177 of file audioengine.h.
PBD::Signal<void()> ARDOUR::AudioEngine::DeviceResetFinished |
Definition at line 194 of file audioengine.h.
PBD::Signal<void()> ARDOUR::AudioEngine::DeviceResetStarted |
Definition at line 193 of file audioengine.h.
PBD::TimingStats ARDOUR::AudioEngine::dsp_stats[NTT] |
Definition at line 257 of file audioengine.h.
PBD::Signal<void(pframes_t)> ARDOUR::AudioEngine::Freewheel |
Definition at line 162 of file audioengine.h.
PBD::Signal<void(const char*)> ARDOUR::AudioEngine::Halted |
Definition at line 181 of file audioengine.h.
|
private |
time of the last monitor check in samples
Definition at line 278 of file audioengine.h.
|
private |
number of samples between each check for changes in monitor input
Definition at line 276 of file audioengine.h.
PBD::Signal<void(uint32_t)> ARDOUR::AudioEngine::Running |
Definition at line 187 of file audioengine.h.
PBD::Signal<void(samplecnt_t)> ARDOUR::AudioEngine::SampleRateChanged |
this signal is emitted if the sample rate changes
Definition at line 167 of file audioengine.h.
|
private |
Definition at line 270 of file audioengine.h.
|
private |
Definition at line 269 of file audioengine.h.
|
private |
Definition at line 271 of file audioengine.h.
|
private |
Definition at line 272 of file audioengine.h.
|
private |
Definition at line 268 of file audioengine.h.
|
private |
Definition at line 267 of file audioengine.h.
PBD::Signal<void()> ARDOUR::AudioEngine::Stopped |
Definition at line 188 of file audioengine.h.
PBD::Signal<void()> ARDOUR::AudioEngine::Xrun |
Definition at line 164 of file audioengine.h.