Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::MTC_TransportMaster Class Reference

#include <transport_master.h>

Inheritance diagram for ARDOUR::MTC_TransportMaster:
[legend]

Public Member Functions

 MTC_TransportMaster (std::string const &)
 
 ~MTC_TransportMaster ()
 
void set_session (Session *)
 
void pre_process (pframes_t nframes, samplepos_t now, std::optional< samplepos_t >)
 
void unregister_port ()
 
void reset (bool with_pos)
 
bool locked () const
 
bool ok () const
 
void handle_locate (const MIDI::byte *)
 
samplecnt_t update_interval () const
 
samplecnt_t resolution () const
 
bool requires_seekahead () const
 
samplecnt_t seekahead_distance () const
 
void init ()
 
Timecode::TimecodeFormat apparent_timecode_format () const
 
std::string position_string () const
 
std::string delta_string () const
 
void create_port ()
 
- Public Member Functions inherited from ARDOUR::TimecodeTransportMaster
 TimecodeTransportMaster (std::string const &name, SyncSource type)
 
bool apparent_timecode_format_valid () const
 
bool fr2997 () const
 
void set_fr2997 (bool)
 
- Public Member Functions inherited from ARDOUR::TransportMaster
 TransportMaster (SyncSource t, std::string const &name)
 
virtual ~TransportMaster ()
 
virtual bool speed_and_position (double &speed, samplepos_t &position, samplepos_t &lp, samplepos_t &when, samplepos_t now)
 
virtual bool usable () const
 
virtual bool starting () const
 
virtual bool sample_clock_synced () const
 
virtual void set_sample_clock_synced (bool)
 
sampleoffset_t current_delta () const
 
virtual bool can_loop () const
 
virtual Locationloop_location () const
 
bool has_loop () const
 
SyncSource type () const
 
TransportRequestSource request_type () const
 
std::string name () const
 
void set_name (std::string const &)
 
int set_state (XMLNode const &, int)
 
XMLNodeget_state () const
 
std::shared_ptr< Portport () const
 
bool check_collect ()
 
virtual void set_collect (bool)
 
bool collect () const
 
virtual void check_backend ()
 
virtual bool allow_request (TransportRequestSource, TransportRequestType) const
 
std::string allowed_request_string () const
 
TransportRequestType request_mask () const
 
void set_request_mask (TransportRequestType)
 
bool removeable () const
 
void set_removeable (bool yn)
 
std::string display_name (bool sh=true) const
 
void connect_port_using_state ()
 
- Public Member Functions inherited from PBD::Stateful
 Stateful ()
 
virtual ~Stateful ()
 
virtual bool apply_change (PropertyBase const &)
 
PropertyChange apply_changes (PropertyList const &)
 
const OwnedPropertyListproperties () const
 
void add_property (PropertyBase &s)
 
void add_extra_xml (XMLNode &)
 
XMLNodeextra_xml (const std::string &str, bool add_if_missing=false)
 
void save_extra_xml (const XMLNode &)
 
const PBD::IDid () const
 
bool set_id (const XMLNode &)
 
void set_id (const std::string &)
 
void reset_id ()
 
void clear_changes ()
 
virtual void clear_owned_changes ()
 
PropertyListget_changes_as_properties (PBD::Command *) const
 
virtual void rdiff (std::vector< PBD::Command * > &) const
 
bool changed () const
 
virtual PropertyListproperty_factory (const XMLNode &) const
 
virtual void suspend_property_changes ()
 
virtual void resume_property_changes ()
 
bool property_changes_suspended () const
 
- Public Member Functions inherited from ARDOUR::TransportMasterViaMIDI
virtual ~TransportMasterViaMIDI ()
 
MIDI::Parsertransport_parser ()
 
std::shared_ptr< MidiPortmidi_port () const
 
std::shared_ptr< Portcreate_midi_port (std::string const &port_name)
 

Private Member Functions

void queue_reset (bool with_pos)
 
void maybe_reset ()
 
void update_mtc_qtr (MIDI::Parser &, int, samplepos_t)
 
void update_mtc_time (const MIDI::byte *, bool, samplepos_t)
 
void update_mtc_status (MIDI::MTC_Status)
 
void reset_window (samplepos_t)
 
bool outside_window (samplepos_t) const
 
void init_mtc_dll (samplepos_t, double)
 
void parse_timecode_offset ()
 
void parameter_changed (std::string const &p)
 
void connection_handler (std::weak_ptr< ARDOUR::Port >, std::string, std::weak_ptr< ARDOUR::Port >, std::string, bool)
 

Private Attributes

PBD::ScopedConnectionList port_connections
 
bool can_notify_on_unknown_rate
 
samplepos_t mtc_frame
 
double mtc_frame_dll
 
samplepos_t last_inbound_frame
 
MIDI::byte last_mtc_fps_byte
 
samplepos_t window_begin
 
samplepos_t window_end
 
samplepos_t first_mtc_timestamp
 
Glib::Threads::Mutex reset_lock
 
uint32_t reset_pending
 
bool reset_position
 
int transport_direction
 
int busy_guard1
 
int busy_guard2
 
double quarter_frame_duration
 
Timecode::TimecodeFormat mtc_timecode
 
Timecode::Time timecode
 

Static Private Attributes

static const int sample_tolerance
 

Additional Inherited Members

- Static Public Member Functions inherited from ARDOUR::TransportMaster
static std::shared_ptr< TransportMasterfactory (SyncSource, std::string const &, bool removeable)
 
static std::shared_ptr< TransportMasterfactory (XMLNode const &)
 
static void make_property_quarks ()
 
- Public Attributes inherited from PBD::Stateful
PBD::Signal< void(const PropertyChange &)> PropertyChanged
 
- Static Public Attributes inherited from ARDOUR::TransportMaster
static const std::string state_node_name
 
- Static Public Attributes inherited from PBD::Stateful
static int current_state_version
 
static int loading_state_version
 
- Protected Member Functions inherited from ARDOUR::TimecodeTransportMaster
void register_properties ()
 
- Protected Member Functions inherited from ARDOUR::TransportMaster
virtual std::string format_delta_time (sampleoffset_t) const
 
- Protected Member Functions inherited from PBD::Stateful
void add_instant_xml (XMLNode &, const std::string &directory_path)
 
XMLNodeinstant_xml (const std::string &str, const std::string &directory_path)
 
void add_properties (XMLNode &) const
 
PropertyChange set_values (XMLNode const &)
 
virtual void post_set (const PropertyChange &)
 
virtual void send_change (const PropertyChange &)
 
virtual void mid_thaw (const PropertyChange &)
 
bool regenerate_xml_or_string_ids () const
 
- Protected Member Functions inherited from ARDOUR::TransportMasterViaMIDI
 TransportMasterViaMIDI ()
 
void resync_latency (bool)
 
- Protected Attributes inherited from ARDOUR::TimecodeTransportMaster
samplepos_t timecode_offset
 
bool timecode_negative_offset
 
bool timecode_format_valid
 
- Protected Attributes inherited from ARDOUR::TransportMaster
SyncSource _type
 
PBD::Property< std::string > _name
 
Session_session
 
sampleoffset_t _current_delta
 
bool _pending_collect
 
bool _removeable
 
PBD::Property< TransportRequestType_request_mask
 
PBD::Property< bool > _sclock_synced
 
PBD::Property< bool > _collect
 
PBD::Property< bool > _connected
 
SafeTime current
 
int transport_direction
 
int dll_initstate
 
double t0
 
double t1
 
double e2
 
double b
 
double c
 
std::shared_ptr< Port_port
 
XMLNode port_node
 
PBD::ScopedConnection port_connection
 
PBD::ScopedConnection backend_connection
 
- Protected Attributes inherited from PBD::Stateful
XMLNode_extra_xml
 
XMLNode_instant_xml
 
PBD::PropertyChange _pending_changed
 
Glib::Threads::Mutex _lock
 
std::string _xml_node_name
 name of node to use for this object in XML More...
 
OwnedPropertyList_properties
 
- Protected Attributes inherited from ARDOUR::TransportMasterViaMIDI
MIDI::Parser parser
 
std::shared_ptr< MidiPort_midi_port
 
LatencyRange midi_port_latency
 

Detailed Description

Definition at line 508 of file transport_master.h.

Constructor & Destructor Documentation

◆ MTC_TransportMaster()

ARDOUR::MTC_TransportMaster::MTC_TransportMaster ( std::string const &  )

◆ ~MTC_TransportMaster()

ARDOUR::MTC_TransportMaster::~MTC_TransportMaster ( )

Member Function Documentation

◆ apparent_timecode_format()

Timecode::TimecodeFormat ARDOUR::MTC_TransportMaster::apparent_timecode_format ( ) const
virtual

◆ connection_handler()

void ARDOUR::MTC_TransportMaster::connection_handler ( std::weak_ptr< ARDOUR::Port ,
std::string  ,
std::weak_ptr< ARDOUR::Port ,
std::string  ,
bool   
)
privatevirtual

Reimplemented from ARDOUR::TransportMaster.

◆ create_port()

void ARDOUR::MTC_TransportMaster::create_port ( )
virtual

◆ delta_string()

std::string ARDOUR::MTC_TransportMaster::delta_string ( ) const
virtual
Returns
- current time-delta between engine and sync-source

Reimplemented from ARDOUR::TransportMaster.

◆ handle_locate()

void ARDOUR::MTC_TransportMaster::handle_locate ( const MIDI::byte )

◆ init()

void ARDOUR::MTC_TransportMaster::init ( )
virtual

◆ init_mtc_dll()

void ARDOUR::MTC_TransportMaster::init_mtc_dll ( samplepos_t  ,
double   
)
private

◆ locked()

bool ARDOUR::MTC_TransportMaster::locked ( ) const
virtual

reports to ARDOUR whether the TransportMaster is currently synced to its external time source.

Returns
- when returning false, the transport will stop rolling

Implements ARDOUR::TransportMaster.

◆ maybe_reset()

void ARDOUR::MTC_TransportMaster::maybe_reset ( )
private

◆ ok()

bool ARDOUR::MTC_TransportMaster::ok ( ) const
virtual

reports to ARDOUR whether the slave is in a sane state

Returns
- when returning false, the transport will be stopped and the slave disconnected from ARDOUR.

Implements ARDOUR::TransportMaster.

◆ outside_window()

bool ARDOUR::MTC_TransportMaster::outside_window ( samplepos_t  ) const
private

◆ parameter_changed()

void ARDOUR::MTC_TransportMaster::parameter_changed ( std::string const &  p)
privatevirtual

Reimplemented from ARDOUR::TransportMasterViaMIDI.

◆ parse_timecode_offset()

void ARDOUR::MTC_TransportMaster::parse_timecode_offset ( )
private

◆ position_string()

std::string ARDOUR::MTC_TransportMaster::position_string ( ) const
virtual

◆ pre_process()

void ARDOUR::MTC_TransportMaster::pre_process ( pframes_t  nframes,
samplepos_t  now,
std::optional< samplepos_t  
)
virtual

◆ queue_reset()

void ARDOUR::MTC_TransportMaster::queue_reset ( bool  with_pos)
private

◆ requires_seekahead()

bool ARDOUR::MTC_TransportMaster::requires_seekahead ( ) const
inlinevirtual
Returns
- when returning true, ARDOUR will wait for seekahead_distance() before transport starts rolling

Implements ARDOUR::TransportMaster.

Definition at line 527 of file transport_master.h.

◆ reset()

void ARDOUR::MTC_TransportMaster::reset ( bool  with_pos)
virtual

◆ reset_window()

void ARDOUR::MTC_TransportMaster::reset_window ( samplepos_t  )
private

◆ resolution()

samplecnt_t ARDOUR::MTC_TransportMaster::resolution ( ) const
virtual
Returns
- the timing resolution of the TransportMaster - If the distance of ARDOURs transport to the slave becomes greater than the resolution, sound will stop

Implements ARDOUR::TransportMaster.

◆ seekahead_distance()

samplecnt_t ARDOUR::MTC_TransportMaster::seekahead_distance ( ) const
virtual
Returns
the number of samples that this slave wants to seek ahead. Relevant only if requires_seekahead() returns true.

Reimplemented from ARDOUR::TransportMaster.

◆ set_session()

void ARDOUR::MTC_TransportMaster::set_session ( Session )
virtual

Reimplemented from ARDOUR::TransportMasterViaMIDI.

◆ unregister_port()

void ARDOUR::MTC_TransportMaster::unregister_port ( )
virtual

Reimplemented from ARDOUR::TransportMaster.

◆ update_interval()

samplecnt_t ARDOUR::MTC_TransportMaster::update_interval ( ) const
virtual
Returns
- the expected update interval for the data source used by this transport master. Even if the data is effectively continuous, this number indicates how long it is between changes to the known position of the master.

Implements ARDOUR::TransportMaster.

◆ update_mtc_qtr()

void ARDOUR::MTC_TransportMaster::update_mtc_qtr ( MIDI::Parser ,
int  ,
samplepos_t   
)
private

◆ update_mtc_status()

void ARDOUR::MTC_TransportMaster::update_mtc_status ( MIDI::MTC_Status  )
private

◆ update_mtc_time()

void ARDOUR::MTC_TransportMaster::update_mtc_time ( const MIDI::byte ,
bool  ,
samplepos_t   
)
private

Member Data Documentation

◆ busy_guard1

int ARDOUR::MTC_TransportMaster::busy_guard1
private

Definition at line 558 of file transport_master.h.

◆ busy_guard2

int ARDOUR::MTC_TransportMaster::busy_guard2
private

Definition at line 559 of file transport_master.h.

◆ can_notify_on_unknown_rate

bool ARDOUR::MTC_TransportMaster::can_notify_on_unknown_rate
private

Definition at line 542 of file transport_master.h.

◆ first_mtc_timestamp

samplepos_t ARDOUR::MTC_TransportMaster::first_mtc_timestamp
private

Definition at line 552 of file transport_master.h.

◆ last_inbound_frame

samplepos_t ARDOUR::MTC_TransportMaster::last_inbound_frame
private

Definition at line 548 of file transport_master.h.

◆ last_mtc_fps_byte

MIDI::byte ARDOUR::MTC_TransportMaster::last_mtc_fps_byte
private

Definition at line 549 of file transport_master.h.

◆ mtc_frame

samplepos_t ARDOUR::MTC_TransportMaster::mtc_frame
private

Definition at line 546 of file transport_master.h.

◆ mtc_frame_dll

double ARDOUR::MTC_TransportMaster::mtc_frame_dll
private

Definition at line 547 of file transport_master.h.

◆ mtc_timecode

Timecode::TimecodeFormat ARDOUR::MTC_TransportMaster::mtc_timecode
private

Definition at line 562 of file transport_master.h.

◆ port_connections

PBD::ScopedConnectionList ARDOUR::MTC_TransportMaster::port_connections
private

Definition at line 541 of file transport_master.h.

◆ quarter_frame_duration

double ARDOUR::MTC_TransportMaster::quarter_frame_duration
private

Definition at line 561 of file transport_master.h.

◆ reset_lock

Glib::Threads::Mutex ARDOUR::MTC_TransportMaster::reset_lock
private

Definition at line 554 of file transport_master.h.

◆ reset_pending

uint32_t ARDOUR::MTC_TransportMaster::reset_pending
private

Definition at line 555 of file transport_master.h.

◆ reset_position

bool ARDOUR::MTC_TransportMaster::reset_position
private

Definition at line 556 of file transport_master.h.

◆ sample_tolerance

const int ARDOUR::MTC_TransportMaster::sample_tolerance
staticprivate

Definition at line 544 of file transport_master.h.

◆ timecode

Timecode::Time ARDOUR::MTC_TransportMaster::timecode
private

Definition at line 563 of file transport_master.h.

◆ transport_direction

int ARDOUR::MTC_TransportMaster::transport_direction
private

Definition at line 557 of file transport_master.h.

◆ window_begin

samplepos_t ARDOUR::MTC_TransportMaster::window_begin
private

Definition at line 550 of file transport_master.h.

◆ window_end

samplepos_t ARDOUR::MTC_TransportMaster::window_end
private

Definition at line 551 of file transport_master.h.


The documentation for this class was generated from the following file: