#include <list>
#include <map>
#include <set>
-#include <stack>
#include <string>
#include <vector>
#include <stdint.h>
int wipe ();
- std::pair<framepos_t, framepos_t> get_extent () const;
framepos_t current_end_frame () const;
framepos_t current_start_frame () const;
/** "actual" sample rate of session, set by current audioengine rate, pullup/down etc. */
}
}
+ std::list<RouteGroup*> const & route_groups () const {
+ return _route_groups;
+ }
+
/* fundamental operations. duh. */
std::list<boost::shared_ptr<AudioTrack> > new_audio_track (
int input_channels, int output_channels, TrackMode mode = Normal, RouteGroup* route_group = 0, uint32_t how_many = 1
);
- RouteList new_audio_route (bool aux, int input_channels, int output_channels, RouteGroup* route_group, uint32_t how_many);
+ RouteList new_audio_route (int input_channels, int output_channels, RouteGroup* route_group, uint32_t how_many);
std::list<boost::shared_ptr<MidiTrack> > new_midi_track (
TrackMode mode = Normal, RouteGroup* route_group = 0, uint32_t how_many = 1
std::string next_redo() const { return _history.next_redo(); }
void begin_reversible_command (const std::string& cmd_name);
+ void begin_reversible_command (GQuark);
void commit_reversible_command (Command* cmd = 0);
- UndoTransaction* start_reversible_command (const std::string& cmd_name);
- void finish_reversible_command (UndoTransaction&);
-
void add_command (Command *const cmd) {
- assert(!_current_trans.empty ());
- _current_trans.top()->add_command (cmd);
+ assert (_current_trans);
+ _current_trans->add_command (cmd);
+ }
+
+ /** @return The list of operations that are currently in progress */
+ std::list<GQuark> const & current_operations () {
+ return _current_trans_quarks;
}
void add_commands (std::vector<Command*> const & cmds);
Location* _session_range_location; ///< session range, or 0 if there is nothing in the session yet
Slave* _slave;
bool _silent;
+
+ void maybe_update_session_range (framepos_t, framepos_t);
// varispeed playback
double _transport_speed;
std::string _path;
std::string _name;
bool _is_new;
- bool session_send_mtc;
+ bool _send_qf_mtc;
+ /** Number of process frames since the last MTC output (when sending MTC); used to
+ * know when to send full MTC messages every so often.
+ */
+ pframes_t _pframes_since_last_mtc;
bool session_midi_feedback;
bool play_loop;
bool loop_changing;
void first_stage_init (std::string path, std::string snapshot_name);
int second_stage_init ();
- void update_session_range_location_marker ();
void remove_empty_sounds ();
void setup_midi_control ();
bool _send_timecode_update; ///< Flag to send a full frame (Timecode) MTC message this cycle
- int send_midi_time_code_for_cycle (pframes_t nframes);
+ int send_midi_time_code_for_cycle (framepos_t, framepos_t, pframes_t nframes);
void reset_record_status ();
void remove_playlist (boost::weak_ptr<Playlist>);
void track_playlist_changed (boost::weak_ptr<Track>);
+ void playlist_region_added (boost::weak_ptr<Region>);
+ void playlist_ranges_moved (std::list<Evoral::RangeMove<framepos_t> > const &);
/* NAMED SELECTIONS */
void reverse_track_buffers ();
- UndoHistory _history;
- std::stack<UndoTransaction*> _current_trans;
+ UndoHistory _history;
+ /** current undo transaction, or 0 */
+ UndoTransaction* _current_trans;
+ /** GQuarks to describe the reversible commands that are currently in progress.
+ * These may be nested, in which case more recently-started commands are toward
+ * the front of the list.
+ */
+ std::list<GQuark> _current_trans_quarks;
void jack_timebase_callback (jack_transport_state_t, pframes_t, jack_position_t*, int);
int jack_sync_callback (jack_transport_state_t, jack_position_t*);