2 Copyright (C) 2002 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 #include <glibmm/timer.h>
28 #include <pbd/pthread_utils.h>
29 #include <pbd/stacktrace.h>
30 #include <pbd/unknown_type.h>
32 #include <midi++/jack.h>
34 #include <ardour/audioengine.h>
35 #include <ardour/buffer.h>
36 #include <ardour/port.h>
37 #include <ardour/jack_audio_port.h>
38 #include <ardour/jack_midi_port.h>
39 #include <ardour/audio_port.h>
40 #include <ardour/session.h>
41 #include <ardour/cycle_timer.h>
42 #include <ardour/utils.h>
47 #include <ardour/timestamps.h>
52 using namespace ARDOUR;
55 gint AudioEngine::m_meter_exit;
58 ardour_jack_error (const char* msg)
60 error << "JACK: " << msg << endmsg;
63 AudioEngine::AudioEngine (string client_name)
67 session_remove_pending = false;
70 last_monitor_check = 0;
71 monitor_check_interval = max_frames;
72 _processed_frames = 0;
73 _freewheeling = false;
78 _freewheeling = false;
79 _freewheel_thread_registered = false;
82 g_atomic_int_set (&m_meter_exit, 0);
84 if (connect_to_jack (client_name)) {
85 throw NoBackendAvailable ();
87 Port::set_engine (this);
90 AudioEngine::~AudioEngine ()
93 Glib::Mutex::Lock tm (_process_lock);
94 session_removed.signal ();
97 jack_client_close (_jack);
100 stop_metering_thread ();
105 AudioEngine::jack() const
111 _thread_init_callback (void *arg)
113 /* make sure that anybody who needs to know about this thread
117 PBD::ThreadCreatedWithRequestSize (pthread_self(), X_("Audioengine"), 4096);
118 MIDI::JACK_MidiPort::set_process_thread (pthread_self());
122 AudioEngine::start ()
127 nframes_t blocksize = jack_get_buffer_size (_jack);
129 BootMessage (_("Connect session to engine"));
131 session->set_block_size (blocksize);
132 session->set_frame_rate (jack_get_sample_rate (_jack));
134 /* page in as much of the session process code as we
135 can before we really start running.
138 session->process (blocksize);
139 session->process (blocksize);
140 session->process (blocksize);
141 session->process (blocksize);
142 session->process (blocksize);
143 session->process (blocksize);
144 session->process (blocksize);
145 session->process (blocksize);
148 _processed_frames = 0;
149 last_monitor_check = 0;
151 jack_on_shutdown (_jack, halted, this);
152 jack_set_graph_order_callback (_jack, _graph_order_callback, this);
153 jack_set_thread_init_callback (_jack, _thread_init_callback, this);
154 jack_set_process_callback (_jack, _process_callback, this);
155 jack_set_sample_rate_callback (_jack, _sample_rate_callback, this);
156 jack_set_buffer_size_callback (_jack, _bufsize_callback, this);
157 jack_set_xrun_callback (_jack, _xrun_callback, this);
158 jack_set_sync_callback (_jack, _jack_sync_callback, this);
159 jack_set_freewheel_callback (_jack, _freewheel_callback, this);
161 if (Config->get_jack_time_master()) {
162 jack_set_timebase_callback (_jack, 0, _jack_timebase_callback, this);
165 if (jack_activate (_jack) == 0) {
168 Running(); /* EMIT SIGNAL */
170 // error << _("cannot activate JACK client") << endmsg;
173 start_metering_thread();
176 return _running ? 0 : -1;
180 AudioEngine::stop (bool forever)
184 stop_metering_thread ();
186 jack_client_t* foo = _jack;
188 jack_client_close (foo);
190 jack_deactivate (_jack);
192 Stopped(); /* EMIT SIGNAL */
195 return _running ? -1 : 0;
200 AudioEngine::get_sync_offset (nframes_t& offset) const
203 #ifdef HAVE_JACK_VIDEO_SUPPORT
207 (void) jack_transport_query (_jack, &pos);
209 if (pos.valid & JackVideoFrameOffset) {
210 offset = pos.video_offset;
220 AudioEngine::_jack_timebase_callback (jack_transport_state_t state, nframes_t nframes,
221 jack_position_t* pos, int new_position, void *arg)
223 static_cast<AudioEngine*> (arg)->jack_timebase_callback (state, nframes, pos, new_position);
227 AudioEngine::jack_timebase_callback (jack_transport_state_t state, nframes_t nframes,
228 jack_position_t* pos, int new_position)
230 if (_jack && session && session->synced_to_jack()) {
231 session->jack_timebase_callback (state, nframes, pos, new_position);
236 AudioEngine::_jack_sync_callback (jack_transport_state_t state, jack_position_t* pos, void* arg)
238 return static_cast<AudioEngine*> (arg)->jack_sync_callback (state, pos);
242 AudioEngine::jack_sync_callback (jack_transport_state_t state, jack_position_t* pos)
244 if (_jack && session) {
245 return session->jack_sync_callback (state, pos);
252 AudioEngine::_xrun_callback (void *arg)
254 AudioEngine* ae = static_cast<AudioEngine*> (arg);
256 ae->Xrun (); /* EMIT SIGNAL */
262 AudioEngine::_graph_order_callback (void *arg)
264 AudioEngine* ae = static_cast<AudioEngine*> (arg);
266 ae->GraphReordered (); /* EMIT SIGNAL */
271 /** Wrapped which is called by JACK as its process callback. It is just
272 * here to get us back into C++ land by calling AudioEngine::process_callback()
273 * @param nframes Number of frames passed by JACK.
274 * @param arg User argument passed by JACK, which will be the AudioEngine*.
277 AudioEngine::_process_callback (nframes_t nframes, void *arg)
279 return static_cast<AudioEngine *> (arg)->process_callback (nframes);
283 AudioEngine::_freewheel_callback (int onoff, void *arg)
285 static_cast<AudioEngine*>(arg)->_freewheeling = onoff;
288 /** Method called by JACK (via _process_callback) which says that there
289 * is work to be done.
290 * @param nframes Number of frames to process.
293 AudioEngine::process_callback (nframes_t nframes)
295 // CycleTimer ct ("AudioEngine::process");
296 Glib::Mutex::Lock tm (_process_lock, Glib::TRY_LOCK);
298 /// The number of frames that will have been processed when we've finished
299 nframes_t next_processed_frames;
301 /* handle wrap around of total frames counter */
303 if (max_frames - _processed_frames < nframes) {
304 next_processed_frames = nframes - (max_frames - _processed_frames);
306 next_processed_frames = _processed_frames + nframes;
309 if (!tm.locked() || session == 0) {
310 /* return having done nothing */
311 _processed_frames = next_processed_frames;
315 if (session_remove_pending) {
316 /* perform the actual session removal */
318 session_remove_pending = false;
319 session_removed.signal();
320 _processed_frames = next_processed_frames;
325 /* emit the Freewheel signal and stop freewheeling in the event of trouble */
326 if (Freewheel (nframes)) {
327 cerr << "Freewheeling returned non-zero!\n";
328 _freewheeling = false;
329 jack_set_freewheel (_jack, false);
334 boost::shared_ptr<Ports> p = ports.reader();
336 // Prepare ports (ie read data if necessary)
337 for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
338 (*i)->cycle_start (nframes, 0);
342 session->process (nframes);
345 // Finalize ports (ie write data if necessary)
347 for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
348 (*i)->cycle_end (nframes, 0);
352 _processed_frames = next_processed_frames;
356 if (last_monitor_check + monitor_check_interval < next_processed_frames) {
358 boost::shared_ptr<Ports> p = ports.reader();
360 for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
365 if (port->_last_monitor != (x = port->monitoring_input ())) {
366 port->_last_monitor = x;
367 /* XXX I think this is dangerous, due to
368 a likely mutex in the signal handlers ...
370 port->MonitorInputChanged (x); /* EMIT SIGNAL */
373 last_monitor_check = next_processed_frames;
376 if (session->silent()) {
378 boost::shared_ptr<Ports> p = ports.reader();
380 for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
384 if (port->sends_output()) {
385 port->get_buffer().silence(nframes);
390 _processed_frames = next_processed_frames;
395 AudioEngine::_sample_rate_callback (nframes_t nframes, void *arg)
397 return static_cast<AudioEngine *> (arg)->jack_sample_rate_callback (nframes);
401 AudioEngine::jack_sample_rate_callback (nframes_t nframes)
403 _frame_rate = nframes;
404 _usecs_per_cycle = (int) floor ((((double) frames_per_cycle() / nframes)) * 1000000.0);
406 /* check for monitor input change every 1/10th of second */
408 monitor_check_interval = nframes / 10;
409 last_monitor_check = 0;
412 session->set_frame_rate (nframes);
415 SampleRateChanged (nframes); /* EMIT SIGNAL */
421 AudioEngine::_bufsize_callback (nframes_t nframes, void *arg)
423 return static_cast<AudioEngine *> (arg)->jack_bufsize_callback (nframes);
427 AudioEngine::jack_bufsize_callback (nframes_t nframes)
429 _buffer_size = nframes;
430 _usecs_per_cycle = (int) floor ((((double) nframes / frame_rate())) * 1000000.0);
431 last_monitor_check = 0;
433 boost::shared_ptr<Ports> p = ports.reader();
435 for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
440 session->set_block_size (_buffer_size);
447 AudioEngine::stop_metering_thread ()
449 if (m_meter_thread) {
450 g_atomic_int_set (&m_meter_exit, 1);
451 m_meter_thread->join ();
457 AudioEngine::start_metering_thread ()
459 if (m_meter_thread == 0) {
460 g_atomic_int_set (&m_meter_exit, 0);
461 m_meter_thread = Glib::Thread::create (sigc::mem_fun(this, &AudioEngine::meter_thread),
462 500000, true, true, Glib::THREAD_PRIORITY_NORMAL);
467 AudioEngine::meter_thread ()
470 Glib::usleep (10000); /* 1/100th sec interval */
471 if (g_atomic_int_get(&m_meter_exit)) {
474 IO::update_meters ();
479 AudioEngine::set_session (Session *s)
481 Glib::Mutex::Lock pl (_process_lock);
487 nframes_t blocksize = jack_get_buffer_size (_jack);
489 /* page in as much of the session process code as we
490 can before we really start running.
493 boost::shared_ptr<Ports> p = ports.reader();
495 for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
496 (*i)->cycle_start (blocksize, 0);
499 s->process (blocksize);
500 s->process (blocksize);
501 s->process (blocksize);
502 s->process (blocksize);
503 s->process (blocksize);
504 s->process (blocksize);
505 s->process (blocksize);
506 s->process (blocksize);
508 for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
509 (*i)->cycle_end (blocksize, 0);
515 AudioEngine::remove_session ()
517 Glib::Mutex::Lock lm (_process_lock);
522 session_remove_pending = true;
523 session_removed.wait(_process_lock);
534 AudioEngine::port_registration_failure (const std::string& portname)
536 string full_portname = jack_client_name;
537 full_portname += ':';
538 full_portname += portname;
541 jack_port_t* p = jack_port_by_name (_jack, full_portname.c_str());
545 reason = _("a port with this name already exists: check for duplicated track/bus names");
547 reason = _("unknown error");
550 throw PortRegistrationFailure (string_compose (_("AudioEngine: cannot register port \"%1\": %2"), portname, reason).c_str());
554 AudioEngine::register_port (DataType dtype, const string& portname, bool input, bool publish)
559 if (dtype == DataType::AUDIO) {
560 newport = new AudioPort (portname, (input ? Port::IsInput : Port::IsOutput), publish, frames_per_cycle());
561 } else if (dtype == DataType::MIDI) {
562 newport = new MidiPort (portname, (input ? Port::IsInput : Port::IsOutput), publish, frames_per_cycle());
564 throw unknown_type();
567 RCUWriter<Ports> writer (ports);
568 boost::shared_ptr<Ports> ps = writer.get_copy ();
569 ps->insert (ps->begin(), newport);
570 /* writer goes out of scope, forces update */
576 throw PortRegistrationFailure("unable to create port (unknown type?)");
581 AudioEngine::get_port (const std::string& full_name)
583 boost::shared_ptr<Ports> p = ports.reader();
585 for (Ports::iterator i = p->begin(); i != p->end(); ++i) {
586 if ((*i)->name() == full_name) {
595 AudioEngine::register_input_port (DataType type, const string& portname, bool publish)
597 return register_port (type, portname, true, publish);
601 AudioEngine::register_output_port (DataType type, const string& portname, bool publish)
603 return register_port (type, portname, false, publish);
607 AudioEngine::unregister_port (Port& port)
609 /* caller must hold process lock */
612 /* probably happening when the engine has been halted by JACK,
613 in which case, there is nothing we can do here.
620 RCUWriter<Ports> writer (ports);
621 boost::shared_ptr<Ports> ps = writer.get_copy ();
623 for (Ports::iterator i = ps->begin(); i != ps->end(); ++i) {
631 /* writer goes out of scope, forces update */
634 remove_connections_for (port);
640 AudioEngine::connect (const string& source, const string& destination)
646 fatal << _("connect called before engine was started") << endmsg;
653 string s = make_port_name_non_relative (source);
654 string d = make_port_name_non_relative (destination);
656 Port* src = get_port (s);
657 Port* dst = get_port (d);
661 /* both ports are known to us, so do the internal connect stuff */
663 if ((ret = src->connect (*dst)) == 0) {
664 ret = dst->connect (*src);
667 } else if (src || dst) {
669 /* one port is known to us, try to connect it to something external */
671 PortConnectableByName* pcn;
675 pcn = dynamic_cast<PortConnectableByName*>(src);
678 pcn = dynamic_cast<PortConnectableByName*>(dst);
683 ret = pcn->connect (other);
690 /* neither port is known to us, and this API isn't intended for use as a general patch bay */
697 error << string_compose(_("AudioEngine: connection already exists: %1 (%2) to %3 (%4)"),
698 source, s, destination, d)
700 } else if (ret < 0) {
701 error << string_compose(_("AudioEngine: cannot connect %1 (%2) to %3 (%4)"),
702 source, s, destination, d)
710 AudioEngine::disconnect (const string& source, const string& destination)
716 fatal << _("disconnect called before engine was started") << endmsg;
723 string s = make_port_name_non_relative (source);
724 string d = make_port_name_non_relative (destination);
726 Port* src = get_port (s);
727 Port* dst = get_port (d);
731 /* both ports are known to us, so do the internal connect stuff */
733 if ((ret = src->disconnect (*dst)) == 0) {
734 ret = dst->disconnect (*src);
737 } else if (src || dst) {
739 /* one port is known to us, try to connect it to something external */
742 PortConnectableByName* pcn;
746 pcn = dynamic_cast<PortConnectableByName*>(src);
749 pcn = dynamic_cast<PortConnectableByName*>(dst);
754 ret = pcn->disconnect (other);
761 /* neither port is known to us, and this API isn't intended for use as a general patch bay */
771 AudioEngine::disconnect (Port& port)
775 fatal << _("disconnect called before engine was started") << endmsg;
782 return port.disconnect_all ();
786 AudioEngine::frame_rate ()
789 if (_frame_rate == 0) {
790 return (_frame_rate = jack_get_sample_rate (_jack));
795 fatal << X_("programming error: AudioEngine::frame_rate() called while disconnected from JACK")
803 AudioEngine::frames_per_cycle ()
806 if (_buffer_size == 0) {
807 return (_buffer_size = jack_get_buffer_size (_jack));
812 fatal << X_("programming error: AudioEngine::frame_rate() called while disconnected from JACK")
819 /** Get a port by name.
820 * Note this can return NULL, it will NOT create a port if it is not found (any more).
823 AudioEngine::get_port_by_name (const string& portname, bool keep) const
825 Glib::Mutex::Lock lm (_process_lock);
829 fatal << _("get_port_by_name() called before engine was started") << endmsg;
836 boost::shared_ptr<Ports> pr = ports.reader();
838 for (Ports::iterator i = pr->begin(); i != pr->end(); ++i) {
839 if (portname == (*i)->name()) {
848 AudioEngine::get_ports (const string& port_name_pattern, const string& type_name_pattern, uint32_t flags)
852 fatal << _("get_ports called before engine was started") << endmsg;
858 return jack_get_ports (_jack, port_name_pattern.c_str(), type_name_pattern.c_str(), flags);
862 AudioEngine::halted (void *arg)
864 AudioEngine* ae = static_cast<AudioEngine *> (arg);
865 bool was_running = ae->_running;
867 ae->stop_metering_thread ();
869 ae->_running = false;
870 ae->_buffer_size = 0;
875 ae->Halted(); /* EMIT SIGNAL */
880 AudioEngine::n_physical_outputs () const
889 if ((ports = jack_get_ports (_jack, NULL, NULL, JackPortIsPhysical|JackPortIsInput)) == 0) {
894 for (i = 0; ports[i]; ++i);
901 AudioEngine::n_physical_inputs () const
910 if ((ports = jack_get_ports (_jack, NULL, NULL, JackPortIsPhysical|JackPortIsOutput)) == 0) {
915 for (i = 0; ports[i]; ++i);
922 AudioEngine::get_physical_inputs (vector<string>& ins)
931 if ((ports = jack_get_ports (_jack, NULL, NULL, JackPortIsPhysical|JackPortIsOutput)) == 0) {
936 for (i = 0; ports[i]; ++i) {
937 ins.push_back (ports[i]);
944 AudioEngine::get_physical_outputs (vector<string>& outs)
953 if ((ports = jack_get_ports (_jack, NULL, NULL, JackPortIsPhysical|JackPortIsInput)) == 0) {
958 for (i = 0; ports[i]; ++i) {
959 outs.push_back (ports[i]);
966 AudioEngine::get_nth_physical (DataType type, uint32_t n, int flag)
972 assert(type != DataType::NIL);
974 if (!_running || !_jack) {
976 fatal << _("get_nth_physical called before engine was started") << endmsg;
983 ports = jack_get_ports (_jack, NULL, type.to_jack_type(), JackPortIsPhysical|flag);
989 for (i = 0; i < n && ports[i]; ++i);
995 free ((char *) ports);
1001 AudioEngine::get_port_total_latency (const Port& port)
1003 return port.total_latency ();
1007 AudioEngine::update_total_latency (const Port& port)
1010 fatal << _("update_total_latency() called with no JACK client connection") << endmsg;
1016 fatal << _("update_total_latency() called before engine was started") << endmsg;
1021 port.recompute_total_latency ();
1025 AudioEngine::transport_stop ()
1027 // cerr << "tell JACK to stop\n";
1029 jack_transport_stop (_jack);
1034 AudioEngine::transport_start ()
1036 // cerr << "tell JACK to start\n";
1038 jack_transport_start (_jack);
1043 AudioEngine::transport_locate (nframes_t where)
1045 // cerr << "tell JACK to locate to " << where << endl;
1047 jack_transport_locate (_jack, where);
1051 AudioEngine::TransportState
1052 AudioEngine::transport_state ()
1055 jack_position_t pos;
1056 return (TransportState) jack_transport_query (_jack, &pos);
1058 return (TransportState) JackTransportStopped;
1063 AudioEngine::reset_timebase ()
1066 if (Config->get_jack_time_master()) {
1067 return jack_set_timebase_callback (_jack, 0, _jack_timebase_callback, this);
1069 return jack_release_timebase (_jack);
1077 AudioEngine::freewheel (bool onoff)
1082 _freewheel_thread_registered = false;
1085 return jack_set_freewheel (_jack, onoff);
1093 AudioEngine::remove_all_ports ()
1095 /* process lock MUST be held */
1098 RCUWriter<Ports> writer (ports);
1099 boost::shared_ptr<Ports> ps = writer.get_copy ();
1105 AudioEngine::remove_connections_for (Port& port)
1107 for (PortConnections::iterator i = port_connections.begin(); i != port_connections.end(); ) {
1108 PortConnections::iterator tmp;
1113 if ((*i).first == port.name()) {
1114 port_connections.erase (i);
1122 #ifdef HAVE_JACK_CLIENT_OPEN
1125 AudioEngine::connect_to_jack (string client_name)
1127 jack_options_t options = JackNullOption;
1128 jack_status_t status;
1129 const char *server_name = NULL;
1131 jack_client_name = client_name; /* might be reset below */
1132 _jack = jack_client_open (jack_client_name.c_str(), options, &status, server_name);
1134 if (_jack == NULL) {
1136 if (status & JackServerFailed) {
1137 error << _("Unable to connect to JACK server") << endmsg;
1140 // error message is not useful here
1144 if (status & JackServerStarted) {
1145 info << _("JACK server started") << endmsg;
1148 if (status & JackNameNotUnique) {
1149 jack_client_name = jack_get_client_name (_jack);
1152 jack_set_error_function (ardour_jack_error);
1160 AudioEngine::connect_to_jack (string client_name)
1162 jack_client_name = client_name;
1164 if ((_jack = jack_client_new (client_name.c_str())) == NULL) {
1171 #endif /* HAVE_JACK_CLIENT_OPEN */
1174 AudioEngine::disconnect_from_jack ()
1180 jack_client_close (_jack);
1186 stop_metering_thread ();
1188 Stopped(); /* EMIT SIGNAL */
1196 AudioEngine::reconnect_to_jack ()
1199 disconnect_from_jack ();
1200 /* XXX give jackd a chance */
1201 Glib::usleep (250000);
1204 if (connect_to_jack (jack_client_name)) {
1205 error << _("failed to connect to JACK") << endmsg;
1211 boost::shared_ptr<Ports> p = ports.reader ();
1213 for (i = p->begin(); i != p->end(); ++i) {
1214 if ((*i)->reestablish ()) {
1219 if (i != p->end()) {
1221 remove_all_ports ();
1227 session->reset_jack_connection (_jack);
1228 nframes_t blocksize = jack_get_buffer_size (_jack);
1229 session->set_block_size (blocksize);
1230 session->set_frame_rate (jack_get_sample_rate (_jack));
1233 last_monitor_check = 0;
1235 jack_on_shutdown (_jack, halted, this);
1236 jack_set_graph_order_callback (_jack, _graph_order_callback, this);
1237 jack_set_thread_init_callback (_jack, _thread_init_callback, this);
1238 jack_set_process_callback (_jack, _process_callback, this);
1239 jack_set_sample_rate_callback (_jack, _sample_rate_callback, this);
1240 jack_set_buffer_size_callback (_jack, _bufsize_callback, this);
1241 jack_set_xrun_callback (_jack, _xrun_callback, this);
1242 jack_set_sync_callback (_jack, _jack_sync_callback, this);
1243 jack_set_freewheel_callback (_jack, _freewheel_callback, this);
1245 if (Config->get_jack_time_master()) {
1246 jack_set_timebase_callback (_jack, 0, _jack_timebase_callback, this);
1249 if (jack_activate (_jack) == 0) {
1256 /* re-establish connections */
1258 for (i = p->begin(); i != p->end(); ++i) {
1262 Running (); /* EMIT SIGNAL*/
1264 start_metering_thread ();
1270 AudioEngine::request_buffer_size (nframes_t nframes)
1274 if (nframes == jack_get_buffer_size (_jack)) {
1278 return jack_set_buffer_size (_jack, nframes);
1286 AudioEngine::update_total_latencies ()
1288 #ifdef HAVE_JACK_RECOMPUTE_LATENCIES
1289 jack_recompute_total_latencies (_jack);
1294 AudioEngine::make_port_name_relative (string portname)
1296 string::size_type len;
1297 string::size_type n;
1299 len = portname.length();
1301 for (n = 0; n < len; ++n) {
1302 if (portname[n] == ':') {
1307 if ((n != len) && (portname.substr (0, n) == jack_client_name)) {
1308 return portname.substr (n+1);
1315 AudioEngine::make_port_name_non_relative (string portname)
1319 if (portname.find_first_of (':') != string::npos) {
1323 str = jack_client_name;
1331 AudioEngine::is_realtime () const
1334 return jack_is_realtime (_jack);