mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-10 23:46:20 +01:00
Add function to find transport master by port and expose midi parser
This commit is contained in:
parent
8237add6d2
commit
5adbcd0673
3 changed files with 17 additions and 0 deletions
|
|
@ -456,6 +456,7 @@ class LIBARDOUR_API TransportMasterViaMIDI
|
|||
public:
|
||||
virtual ~TransportMasterViaMIDI ();
|
||||
|
||||
MIDI::Parser& transport_parser () { return parser; }
|
||||
boost::shared_ptr<MidiPort> midi_port () const
|
||||
{
|
||||
return _midi_port;
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ class LIBARDOUR_API TransportMasterManager : public boost::noncopyable
|
|||
|
||||
boost::shared_ptr<TransportMaster> master_by_type (SyncSource src) const;
|
||||
boost::shared_ptr<TransportMaster> master_by_name (std::string const &) const;
|
||||
boost::shared_ptr<TransportMaster> master_by_port (boost::shared_ptr<Port> const &p) const;
|
||||
|
||||
TransportMasters const & transport_masters() const { return _transport_masters; }
|
||||
|
||||
|
|
|
|||
|
|
@ -677,6 +677,21 @@ TransportMasterManager::master_by_type (SyncSource src) const
|
|||
return boost::shared_ptr<TransportMaster> ();
|
||||
}
|
||||
|
||||
boost::shared_ptr<TransportMaster>
|
||||
TransportMasterManager::master_by_port (boost::shared_ptr<Port> const &p) const
|
||||
{
|
||||
Glib::Threads::RWLock::ReaderLock lm (lock);
|
||||
|
||||
for (TransportMasters::const_iterator tm = _transport_masters.begin(); tm != _transport_masters.end(); ++tm) {
|
||||
if ((*tm)->port() == p) {
|
||||
return *tm;
|
||||
}
|
||||
}
|
||||
|
||||
return boost::shared_ptr<TransportMaster> ();
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
TransportMasterManager::engine_stopped ()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue