ardour
|
#include <audioengine.h>
Classes | |
class | NoBackendAvailable |
Public Types | |
enum | LatencyMeasurement { MeasureNone, MeasureAudio, MeasureMIDI } |
Public Types inherited from ARDOUR::PortManager | |
typedef std::map< std::string, boost::shared_ptr< Port > > | Ports |
typedef std::list < boost::shared_ptr< Port > > | PortList |
Public Member Functions | |
virtual | ~AudioEngine () |
int | discover_backends () |
std::vector< const AudioBackendInfo * > | available_backends () const |
std::string | current_backend_name () const |
boost::shared_ptr< AudioBackend > | set_default_backend () |
boost::shared_ptr< AudioBackend > | set_backend (const std::string &, const std::string &arg1, const std::string &arg2) |
boost::shared_ptr< AudioBackend > | current_backend () const |
bool | setup_required () 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 (framepos_t pos) |
framepos_t | transport_frame () |
framecnt_t | sample_rate () const |
pframes_t | samples_per_cycle () const |
int | usecs_per_cycle () const |
size_t | raw_buffer_size (DataType t) |
framepos_t | sample_time () |
framepos_t | sample_time_at_cycle_start () |
pframes_t | samples_since_cycle_start () |
bool | get_sync_offset (pframes_t &offset) const |
int | create_process_thread (boost::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_realtime () const |
bool | connected () const |
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_input_channels (uint32_t) |
int | set_output_channels (uint32_t) |
int | set_systemic_input_latency (uint32_t) |
int | set_systemic_output_latency (uint32_t) |
bool | freewheeling () const |
bool | running () const |
Glib::Threads::Mutex & | process_lock () |
Glib::Threads::RecMutex & | state_lock () |
int | request_buffer_size (pframes_t samples) |
framecnt_t | processed_frames () const |
void | set_session (Session *) |
void | remove_session () |
Session * | session () const |
void | reconnect_session_routes (bool reconnect_inputs=true, bool reconnect_outputs=true) |
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, framepos_t pos, int new_position) |
int | sync_callback (TransportState state, framepos_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 () |
Public Member Functions inherited from ARDOUR::SessionHandlePtr | |
SessionHandlePtr (ARDOUR::Session *s) | |
SessionHandlePtr () | |
virtual | ~SessionHandlePtr () |
Public Member Functions inherited from ARDOUR::PortManager | |
PortManager () | |
virtual | ~PortManager () |
PortEngine & | port_engine () |
uint32_t | port_name_size () const |
std::string | my_name () const |
boost::shared_ptr< Port > | register_input_port (DataType, const std::string &portname, bool async=false) |
boost::shared_ptr< Port > | register_output_port (DataType, const std::string &portname, bool async=false) |
int | unregister_port (boost::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 (boost::shared_ptr< Port >) |
int | reestablish_ports () |
int | reconnect_ports () |
bool | connected (const std::string &) |
bool | connected_to (const std::string &, const std::string &) |
bool | physically_connected (const std::string &) |
int | get_connections (const std::string &, std::vector< std::string > &) |
boost::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 |
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 > &) |
void | get_physical_inputs (DataType type, std::vector< std::string > &) |
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 | remove_all_ports () |
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 |
Static Public Member Functions | |
static AudioEngine * | create () |
static AudioEngine * | instance () |
static void | destroy () |
static void | thread_init_callback (void *) |
Public Attributes | |
PBD::Signal1< int, pframes_t > | Freewheel |
PBD::Signal0< void > | Xrun |
PBD::Signal1< void, framecnt_t > | SampleRateChanged |
PBD::Signal1< void, pframes_t > | BufferSizeChanged |
PBD::Signal0< void > | DeviceError |
PBD::Signal0< void > | DeviceListChanged |
PBD::Signal1< void, const char * > | Halted |
PBD::Signal0< void > | Running |
PBD::Signal0< void > | Stopped |
PBD::Signal0< void > | DeviceResetStarted |
PBD::Signal0< void > | DeviceResetFinished |
PBD::Signal0< void > | BecameSilent |
Public Attributes inherited from ARDOUR::PortManager | |
PBD::Signal0< void > | GraphReordered |
PBD::Signal0< void > | PortRegisteredOrUnregistered |
PBD::Signal5< void, boost::weak_ptr< Port > , std::string, boost::weak_ptr < Port >, std::string, bool > | PortConnectedOrDisconnected |
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 = 0 |
Additional Inherited Members | |
Protected Member Functions inherited from ARDOUR::SessionHandlePtr | |
virtual void | session_going_away () |
Protected Member Functions inherited from ARDOUR::PortManager | |
boost::shared_ptr< Port > | register_port (DataType type, const std::string &portname, bool input, bool async=false) |
void | port_registration_failure (const std::string &portname) |
void | fade_out (gain_t, gain_t, pframes_t) |
void | silence (pframes_t nframes) |
void | silence_outputs (pframes_t nframes) |
void | check_monitoring () |
void | cycle_start (pframes_t nframes) |
void | cycle_end (pframes_t nframes) |
Protected Attributes inherited from ARDOUR::SessionHandlePtr | |
ARDOUR::Session * | _session |
PBD::ScopedConnectionList | _session_connections |
Protected Attributes inherited from ARDOUR::PortManager | |
boost::shared_ptr< AudioBackend > | _backend |
SerializedRCUManager< Ports > | ports |
bool | _port_remove_in_progress |
boost::shared_ptr< Ports > | _cycle_ports |
Definition at line 60 of file audioengine.h.
|
private |
Definition at line 296 of file audioengine.h.
Enumerator | |
---|---|
MeasureNone | |
MeasureAudio | |
MeasureMIDI |
Definition at line 227 of file audioengine.h.
|
virtual |
Definition at line 106 of file audioengine.cc.
|
private |
Definition at line 70 of file audioengine.cc.
vector< const AudioBackendInfo * > AudioEngine::available_backends | ( | ) | const |
Definition at line 747 of file audioengine.cc.
|
private |
Definition at line 708 of file audioengine.cc.
int AudioEngine::backend_reset_requested | ( | ) |
Definition at line 450 of file audioengine.cc.
int AudioEngine::buffer_size_change | ( | pframes_t | nframes | ) |
Definition at line 166 of file audioengine.cc.
bool AudioEngine::connected | ( | ) | const |
Definition at line 919 of file audioengine.cc.
|
static |
Definition at line 117 of file audioengine.cc.
int AudioEngine::create_process_thread | ( | boost::function< void()> | func | ) |
Definition at line 1046 of file audioengine.cc.
|
inline |
Definition at line 73 of file audioengine.h.
string AudioEngine::current_backend_name | ( | ) | const |
Definition at line 759 of file audioengine.cc.
|
static |
Definition at line 654 of file audioengine.cc.
void AudioEngine::died | ( | ) |
Definition at line 633 of file audioengine.cc.
int AudioEngine::discover_backends | ( | ) |
Definition at line 661 of file audioengine.cc.
|
private |
Definition at line 513 of file audioengine.cc.
|
private |
Definition at line 456 of file audioengine.cc.
|
private |
Definition at line 768 of file audioengine.cc.
int AudioEngine::freewheel | ( | bool | start_stop | ) |
Definition at line 888 of file audioengine.cc.
void AudioEngine::freewheel_callback | ( | bool | onoff | ) |
Definition at line 1188 of file audioengine.cc.
|
inline |
Definition at line 129 of file audioengine.h.
float AudioEngine::get_dsp_load | ( | ) | const |
Definition at line 900 of file audioengine.cc.
bool AudioEngine::get_sync_offset | ( | pframes_t & | offset | ) | const |
Definition at line 1037 of file audioengine.cc.
void AudioEngine::halted_callback | ( | const char * | reason | ) |
Definition at line 1210 of file audioengine.cc.
bool AudioEngine::in_process_thread | ( | ) |
Definition at line 1064 of file audioengine.cc.
|
inlinestatic |
Definition at line 196 of file audioengine.h.
bool AudioEngine::is_realtime | ( | ) | const |
Definition at line 909 of file audioengine.cc.
|
inline |
Definition at line 116 of file audioengine.h.
int AudioEngine::join_process_threads | ( | ) |
Definition at line 1055 of file audioengine.cc.
void AudioEngine::latency_callback | ( | bool | for_playback | ) |
Definition at line 1194 of file audioengine.cc.
|
inline |
Definition at line 225 of file audioengine.h.
void AudioEngine::launch_device_control_app | ( | ) |
Definition at line 432 of file audioengine.cc.
|
inline |
Definition at line 76 of file audioengine.h.
|
inline |
Definition at line 233 of file audioengine.h.
|
inline |
Definition at line 218 of file audioengine.h.
|
inline |
Definition at line 217 of file audioengine.h.
int ARDOUR::AudioEngine::port_registration_callback | ( | ) |
int AudioEngine::prepare_for_latency_measurement | ( | ) |
Definition at line 1242 of file audioengine.cc.
int AudioEngine::process_callback | ( | pframes_t | nframes | ) |
Method called by our ::process_thread when there is work to be done.
nframes | Number of frames to process. |
The number of frames that will have been processed when we've finished
Definition at line 185 of file audioengine.cc.
|
inline |
Definition at line 132 of file audioengine.h.
uint32_t AudioEngine::process_thread_count | ( | ) |
Definition at line 1073 of file audioengine.cc.
|
inline |
Definition at line 139 of file audioengine.h.
size_t AudioEngine::raw_buffer_size | ( | DataType | t | ) |
Definition at line 1001 of file audioengine.cc.
void AudioEngine::reconnect_session_routes | ( | bool | reconnect_inputs = true , |
bool | reconnect_outputs = true |
||
) |
Definition at line 624 of file audioengine.cc.
void AudioEngine::remove_session | ( | ) |
Definition at line 603 of file audioengine.cc.
void AudioEngine::request_backend_reset | ( | ) |
Definition at line 442 of file audioengine.cc.
|
inline |
Definition at line 135 of file audioengine.h.
void AudioEngine::request_device_list_update | ( | ) |
Definition at line 504 of file audioengine.cc.
void AudioEngine::reset_silence_countdown | ( | ) |
Definition at line 418 of file audioengine.cc.
int AudioEngine::reset_timebase | ( | ) |
Definition at line 640 of file audioengine.cc.
|
inline |
Definition at line 130 of file audioengine.h.
framecnt_t AudioEngine::sample_rate | ( | ) | const |
Definition at line 974 of file audioengine.cc.
int AudioEngine::sample_rate_change | ( | pframes_t | nframes | ) |
Definition at line 145 of file audioengine.cc.
framepos_t AudioEngine::sample_time | ( | ) |
Definition at line 1010 of file audioengine.cc.
framepos_t AudioEngine::sample_time_at_cycle_start | ( | ) |
Definition at line 1019 of file audioengine.cc.
pframes_t AudioEngine::samples_per_cycle | ( | ) | const |
Definition at line 983 of file audioengine.cc.
pframes_t AudioEngine::samples_since_cycle_start | ( | ) |
Definition at line 1028 of file audioengine.cc.
|
inline |
Definition at line 143 of file audioengine.h.
boost::shared_ptr< AudioBackend > AudioEngine::set_backend | ( | const std::string & | name, |
const std::string & | arg1, | ||
const std::string & | arg2 | ||
) |
Definition at line 789 of file audioengine.cc.
int AudioEngine::set_buffer_size | ( | uint32_t | bufsiz | ) |
Definition at line 1101 of file audioengine.cc.
boost::shared_ptr< AudioBackend > AudioEngine::set_default_backend | ( | ) |
Definition at line 779 of file audioengine.cc.
int AudioEngine::set_device_name | ( | const std::string & | name | ) |
Definition at line 1082 of file audioengine.cc.
int AudioEngine::set_input_channels | ( | uint32_t | ic | ) |
Definition at line 1119 of file audioengine.cc.
int AudioEngine::set_interleaved | ( | bool | yn | ) |
Definition at line 1110 of file audioengine.cc.
void AudioEngine::set_latency_input_port | ( | const std::string & | ) |
Definition at line 1387 of file audioengine.cc.
void AudioEngine::set_latency_output_port | ( | const std::string & | ) |
Definition at line 1381 of file audioengine.cc.
int AudioEngine::set_output_channels | ( | uint32_t | oc | ) |
Definition at line 1128 of file audioengine.cc.
int AudioEngine::set_sample_rate | ( | float | sr | ) |
Definition at line 1091 of file audioengine.cc.
|
virtual |
Reimplemented from ARDOUR::SessionHandlePtr.
Definition at line 577 of file audioengine.cc.
int AudioEngine::set_systemic_input_latency | ( | uint32_t | il | ) |
Definition at line 1137 of file audioengine.cc.
int AudioEngine::set_systemic_output_latency | ( | uint32_t | ol | ) |
Definition at line 1146 of file audioengine.cc.
bool AudioEngine::setup_required | ( | ) | const |
Definition at line 1227 of file audioengine.cc.
void AudioEngine::split_cycle | ( | pframes_t | offset | ) |
Definition at line 129 of file audioengine.cc.
int AudioEngine::start | ( | bool | for_latency_measurement = false | ) |
Definition at line 817 of file audioengine.cc.
|
private |
Definition at line 538 of file audioengine.cc.
int AudioEngine::start_latency_detection | ( | bool | for_midi | ) |
Definition at line 1258 of file audioengine.cc.
|
inline |
Definition at line 133 of file audioengine.h.
int AudioEngine::stop | ( | bool | for_latency_measurement = false | ) |
Definition at line 853 of file audioengine.cc.
|
private |
Definition at line 555 of file audioengine.cc.
void AudioEngine::stop_latency_detection | ( | ) |
Definition at line 1357 of file audioengine.cc.
int AudioEngine::sync_callback | ( | TransportState | state, |
framepos_t | position | ||
) |
Definition at line 1179 of file audioengine.cc.
|
static |
Definition at line 1157 of file audioengine.cc.
void ARDOUR::AudioEngine::timebase_callback | ( | TransportState | state, |
pframes_t | nframes, | ||
framepos_t | pos, | ||
int | new_position | ||
) |
framepos_t AudioEngine::transport_frame | ( | ) |
Definition at line 965 of file audioengine.cc.
void AudioEngine::transport_locate | ( | framepos_t | pos | ) |
Definition at line 956 of file audioengine.cc.
void AudioEngine::transport_start | ( | ) |
Definition at line 929 of file audioengine.cc.
TransportState AudioEngine::transport_state | ( | ) |
Definition at line 947 of file audioengine.cc.
void AudioEngine::transport_stop | ( | ) |
Definition at line 938 of file audioengine.cc.
void AudioEngine::update_latencies | ( | ) |
Definition at line 1202 of file audioengine.cc.
int AudioEngine::usecs_per_cycle | ( | ) | const |
Definition at line 992 of file audioengine.cc.
|
private |
Definition at line 297 of file audioengine.h.
|
private |
Definition at line 288 of file audioengine.h.
|
private |
Definition at line 258 of file audioengine.h.
|
private |
Definition at line 287 of file audioengine.h.
|
private |
Definition at line 286 of file audioengine.h.
|
private |
Definition at line 285 of file audioengine.h.
|
private |
Definition at line 282 of file audioengine.h.
|
private |
Definition at line 280 of file audioengine.h.
|
private |
Definition at line 281 of file audioengine.h.
|
private |
Definition at line 278 of file audioengine.h.
|
staticprivate |
Definition at line 248 of file audioengine.h.
|
private |
Definition at line 272 of file audioengine.h.
|
private |
Definition at line 273 of file audioengine.h.
|
private |
Definition at line 270 of file audioengine.h.
|
private |
Definition at line 274 of file audioengine.h.
|
private |
Definition at line 271 of file audioengine.h.
|
private |
Definition at line 275 of file audioengine.h.
|
private |
Definition at line 266 of file audioengine.h.
|
private |
Definition at line 269 of file audioengine.h.
|
private |
Definition at line 268 of file audioengine.h.
|
private |
Definition at line 267 of file audioengine.h.
|
private |
Definition at line 250 of file audioengine.h.
|
private |
the number of frames processed since start() was called
Definition at line 264 of file audioengine.h.
|
private |
Definition at line 283 of file audioengine.h.
|
private |
Definition at line 257 of file audioengine.h.
|
private |
Definition at line 277 of file audioengine.h.
|
private |
Definition at line 251 of file audioengine.h.
|
private |
Definition at line 289 of file audioengine.h.
|
private |
Definition at line 284 of file audioengine.h.
|
private |
Definition at line 276 of file audioengine.h.
PBD::Signal0<void> ARDOUR::AudioEngine::BecameSilent |
Definition at line 242 of file audioengine.h.
PBD::Signal1<void, pframes_t> ARDOUR::AudioEngine::BufferSizeChanged |
this signal is emitted if the buffer size changes
Definition at line 170 of file audioengine.h.
PBD::Signal0<void> ARDOUR::AudioEngine::DeviceError |
this signal is emitted if the device cannot operate properly
Definition at line 173 of file audioengine.h.
PBD::Signal0<void> ARDOUR::AudioEngine::DeviceListChanged |
Definition at line 177 of file audioengine.h.
PBD::Signal0<void> ARDOUR::AudioEngine::DeviceResetFinished |
Definition at line 194 of file audioengine.h.
PBD::Signal0<void> ARDOUR::AudioEngine::DeviceResetStarted |
Definition at line 193 of file audioengine.h.
PBD::Signal1<int, pframes_t> ARDOUR::AudioEngine::Freewheel |
Definition at line 162 of file audioengine.h.
PBD::Signal1<void,const char*> ARDOUR::AudioEngine::Halted |
Definition at line 181 of file audioengine.h.
|
private |
time of the last monitor check in frames
Definition at line 262 of file audioengine.h.
|
private |
Definition at line 265 of file audioengine.h.
|
private |
number of frames between each check for changes in monitor input
Definition at line 260 of file audioengine.h.
PBD::Signal0<void> ARDOUR::AudioEngine::Running |
Definition at line 187 of file audioengine.h.
PBD::Signal1<void, framecnt_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 254 of file audioengine.h.
|
private |
Definition at line 255 of file audioengine.h.
|
private |
Definition at line 256 of file audioengine.h.
|
private |
Definition at line 253 of file audioengine.h.
|
private |
Definition at line 252 of file audioengine.h.
PBD::Signal0<void> ARDOUR::AudioEngine::Stopped |
Definition at line 188 of file audioengine.h.
PBD::Signal0<void> ARDOUR::AudioEngine::Xrun |
Definition at line 164 of file audioengine.h.