bool dirty() const { return _state_of_the_state & Dirty; }
void set_deletion_in_progress ();
void clear_deletion_in_progress ();
+ bool reconnection_in_progress() const { return _reconnecting_routes_in_progress; }
bool deletion_in_progress() const { return _state_of_the_state & Deletion; }
+ bool routes_deletion_in_progress() const { return _route_deletion_in_progress; }
+
PBD::Signal0<void> DirtyChanged;
+ PBD::Signal1<void, bool> RouteAddedOrRemoved;
+
const SessionDirectory& session_directory () const { return *(_session_dir.get()); }
static PBD::Signal1<void,std::string> Dialog;
PBD::Signal0<void> IOConnectionsComplete;
+ /* Timecode status signals */
+ PBD::Signal1<void, bool> MTCSyncStateChanged;
+
/* Record status signals */
- PBD::Signal0<void> RecordStateChanged;
+ PBD::Signal0<void> RecordStateChanged; /* signals changes in recording state (i.e. are we recording) */
+ /* XXX may 2015: paul says: it isn't clear to me that this has semantics that cannot be inferrred
+ from the previous signal and session state.
+ */
+ PBD::Signal0<void> RecordArmStateChanged; /* signals changes in recording arming */
+
+ /* Emited when session is loaded */
+ PBD::Signal0<void> SessionLoaded;
/* Transport mechanism signals */
/* Step Editing status changed */
PBD::Signal1<void,bool> StepEditStatusChange;
+ /* Timecode state signals */
+ PBD::Signal0<void> MtcOrLtcInputPortChanged;
+
void queue_event (SessionEvent*);
void request_roll_at_and_return (framepos_t start, framepos_t return_to);
RouteGroup* route_group = 0, uint32_t how_many = 1, std::string name_template = ""
);
- void remove_route (boost::shared_ptr<Route>);
- void resort_routes ();
- void resort_routes_using (boost::shared_ptr<RouteList>);
+ void remove_routes (boost::shared_ptr<RouteList>);
+ void remove_route (boost::shared_ptr<Route>);
+
+ void resort_routes ();
+ void resort_routes_using (boost::shared_ptr<RouteList>);
AudioEngine & engine() { return _engine; }
AudioEngine const & engine () const { return _engine; }
+ static std::string default_track_name_pattern (DataType);
+
/* Time */
framepos_t transport_frame () const {return _transport_frame; }
void request_sync_source (Slave*);
bool synced_to_engine() const { return _slave && config.get_external_sync() && Config->get_sync_source() == Engine; }
-
+ bool synced_to_mtc () const { return config.get_external_sync() && Config->get_sync_source() == MTC && g_atomic_int_get (const_cast<gint*>(&_mtc_active)); }
+
double transport_speed() const { return _transport_speed; }
bool transport_stopped() const { return _transport_speed == 0.0f; }
bool transport_rolling() const { return _transport_speed != 0.0f; }
PBD::Signal0<void> SoloChanged;
PBD::Signal0<void> IsolatedChanged;
+ PBD::Signal0<void> session_routes_reconnected;
+
/* monitor/master out */
void add_monitor_section ();
void maybe_update_session_range (framepos_t, framepos_t);
+ /* temporary hacks to allow selection to be pushed from GUI into backend.
+ Whenever we move the selection object into libardour, these will go away.
+ */
+ void set_range_selection (framepos_t start, framepos_t end);
+ void set_object_selection (framepos_t start, framepos_t end);
+ void clear_range_selection ();
+ void clear_object_selection ();
+
/* buffers for gain and pan */
gain_t* gain_automation_buffer () const;
MIDI::MachineControl& mmc() { return *_mmc; }
+ void reconnect_midi_scene_ports (bool);
+ void reconnect_mtc_ports ();
+ void reconnect_mmc_ports (bool);
+
protected:
friend class AudioEngine;
void set_block_size (pframes_t nframes);
bool _under_nsm_control;
unsigned int _xrun_count;
+ void mtc_status_changed (bool);
+ PBD::ScopedConnection mtc_status_connection;
+
void initialize_latencies ();
void set_worst_io_latencies ();
void set_worst_playback_latency ();
bool have_first_delta_accumulator;
SlaveState _slave_state;
+ gint _mtc_active;
framepos_t slave_wait_end;
void reset_slave_state ();
void update_skips (Location*, bool consolidate);
void update_marks (Location* loc);
- void update_loop (Location* loc);
void consolidate_skips (Location*);
void sync_locations_to_skips ();
void _sync_locations_to_skips ();
int post_engine_init ();
int immediately_post_engine ();
void remove_empty_sounds ();
+
+ void session_loaded ();
void setup_midi_control ();
int midi_read (MIDI::Port *);
void engine_halted ();
void xrun_recovery ();
void set_track_loop (bool);
+ bool select_playhead_priority_target (framepos_t&);
+ void follow_playhead_priority ();
/* These are synchronous and so can only be called from within the process
* cycle
void add_routes (RouteList&, bool input_auto_connect, bool output_auto_connect, bool save);
void add_routes_inner (RouteList&, bool input_auto_connect, bool output_auto_connect);
bool _adding_routes_in_progress;
+ bool _reconnecting_routes_in_progress;
+ bool _route_deletion_in_progress;
+
uint32_t destructive_index;
boost::shared_ptr<Route> XMLRouteFactory (const XMLNode&, int);
void route_processors_changed (RouteProcessorChange);
- bool find_route_name (std::string const &, uint32_t& id, char* name, size_t name_len, bool);
+ bool find_route_name (std::string const &, uint32_t& id, std::string& name, bool);
void count_existing_track_channels (ChanCount& in, ChanCount& out);
void auto_connect_route (boost::shared_ptr<Route> route, ChanCount& existing_inputs, ChanCount& existing_outputs,
bool with_lock, bool connect_inputs = true,
void set_play_range (std::list<AudioRange>&, bool leave_rolling);
void unset_play_range ();
+ /* temporary hacks to allow selection to be pushed from GUI into backend
+ Whenever we move the selection object into libardour, these will go away.
+ */
+ Evoral::Range<framepos_t> _range_selection;
+ Evoral::Range<framepos_t> _object_selection;
+
/* main outs */
uint32_t main_outs;
/** temporary list of Diskstreams used only during load of 2.X sessions */
std::list<boost::shared_ptr<Diskstream> > _diskstreams_2X;
- void add_session_range_location (framepos_t, framepos_t);
+ void set_session_range_location (framepos_t, framepos_t);
void setup_midi_machine_control ();
void save_as_bring_callback (uint32_t, uint32_t, std::string);
static int get_session_info_from_path (XMLTree& state_tree, const std::string& xmlpath);
+ static const uint32_t session_end_shift;
};