Make the port matrix notice if JACK ports are registered or unregistered.
git-svn-id: svn://localhost/ardour2/branches/3.0@5765 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "ardour/types.h"
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/route.h"
|
||||
#include "ardour/audioengine.h"
|
||||
#include "port_matrix.h"
|
||||
#include "port_matrix_body.h"
|
||||
#include "port_matrix_component.h"
|
||||
@@ -73,6 +74,9 @@ PortMatrix::PortMatrix (Window* parent, Session& session, DataType type)
|
||||
|
||||
/* and also bundles */
|
||||
_session.BundleAdded.connect (sigc::hide (mem_fun (*this, &PortMatrix::setup_global_ports)));
|
||||
|
||||
/* and also ports */
|
||||
_session.engine().PortRegisteredOrUnregistered.connect (mem_fun (*this, &PortMatrix::setup_all_ports));
|
||||
|
||||
reconnect_to_routes ();
|
||||
|
||||
|
||||
@@ -203,6 +203,10 @@ class AudioEngine : public sigc::trackable
|
||||
sigc::signal<void> Running;
|
||||
sigc::signal<void> Stopped;
|
||||
|
||||
/* this signal is emitted if a JACK port is registered or unregistered */
|
||||
|
||||
sigc::signal<void> PortRegisteredOrUnregistered;
|
||||
|
||||
std::string make_port_name_relative (std::string);
|
||||
std::string make_port_name_non_relative (std::string);
|
||||
|
||||
@@ -250,6 +254,7 @@ class AudioEngine : public sigc::trackable
|
||||
static void _jack_timebase_callback (jack_transport_state_t, nframes_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 _registration_callback (jack_port_id_t, int, void *);
|
||||
|
||||
void jack_timebase_callback (jack_transport_state_t, nframes_t, jack_position_t*, int);
|
||||
int jack_sync_callback (jack_transport_state_t, jack_position_t*);
|
||||
|
||||
@@ -179,6 +179,7 @@ AudioEngine::start ()
|
||||
jack_set_xrun_callback (_jack, _xrun_callback, this);
|
||||
jack_set_sync_callback (_jack, _jack_sync_callback, this);
|
||||
jack_set_freewheel_callback (_jack, _freewheel_callback, this);
|
||||
jack_set_port_registration_callback (_jack, _registration_callback, this);
|
||||
|
||||
if (session && session->config.get_jack_time_master()) {
|
||||
jack_set_timebase_callback (_jack, 0, _jack_timebase_callback, this);
|
||||
@@ -309,6 +310,13 @@ AudioEngine::_freewheel_callback (int onoff, void *arg)
|
||||
static_cast<AudioEngine*>(arg)->_freewheeling = onoff;
|
||||
}
|
||||
|
||||
void
|
||||
AudioEngine::_registration_callback (jack_port_id_t /*id*/, int /*reg*/, void* arg)
|
||||
{
|
||||
AudioEngine* ae = static_cast<AudioEngine*> (arg);
|
||||
ae->PortRegisteredOrUnregistered (); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
void
|
||||
AudioEngine::split_cycle (nframes_t offset)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user