Type type;
Action action;
- nframes_t action_frame;
- nframes_t target_frame;
+ nframes_t action_frame;
+ nframes_t target_frame;
float speed;
union {
string export_dir () const;
void set_snap_name ();
-
+
+ bool writable() const { return _writable; }
void set_dirty ();
void set_clean ();
bool dirty() const { return _state_of_the_state & Dirty; }
static string suffixed_search_path (std::string suffix, bool data);
static string control_protocol_path ();
static string template_path ();
+ static string route_template_path ();
static string template_dir ();
- static void get_template_list (list<string>&);
+ static string route_template_dir ();
+ static void get_template_list (std::list<std::string>&);
+
+ struct RouteTemplateInfo {
+ std::string name;
+ std::string path;
+ };
+
+ static void get_route_templates (std::vector<RouteTemplateInfo>&);
static string change_audio_path_by_name (string oldpath, string oldname, string newname, bool destructive);
string audio_path_from_name (string, uint32_t nchans, uint32_t chan, bool destructive);
void request_stop (bool abort = false);
void request_locate (nframes_t frame, bool with_roll = false);
- void request_play_loop (bool yn);
+ void request_play_loop (bool yn, bool leave_rolling = false);
bool get_play_loop () const { return play_loop; }
nframes_t last_transport_start() const { return _last_roll_location; }
double frames_per_smpte_frame() const { return _frames_per_smpte_frame; }
nframes_t smpte_frames_per_hour() const { return _smpte_frames_per_hour; }
+ MIDI::byte get_mtc_smpte_bits() const {
+ return mtc_smpte_bits; /* encoding of SMTPE type for MTC */
+ }
+
float smpte_frames_per_second() const;
bool smpte_drop_frames() const;
void remove_pending_capture_state ();
static int rename_template (string old_name, string new_name);
-
static int delete_template (string name);
sigc::signal<void,string> StateSaved;
std::list<boost::shared_ptr<AudioTrack> > new_audio_track (int input_channels, int output_channels, TrackMode mode = Normal, uint32_t how_many = 1);
RouteList new_audio_route (int input_channels, int output_channels, uint32_t how_many);
+ RouteList new_route_from_template (uint32_t how_many, const std::string& template_path);
+
+ /* this is a hack put in to support work on video tracks by Robin Gareus. Nobody
+ should assume that this works yet (February 2009)
+ */
+
+ boost::shared_ptr<Route> new_video_track (string name);
void remove_route (boost::shared_ptr<Route>);
/* control info */
uint32_t total;
+ uint32_t count;
SrcQuality quality;
volatile bool freeze;
std::vector<Glib::ustring> paths;
static sigc::signal<int,nframes_t, nframes_t> AskAboutSampleRateMismatch;
+ class SRMismatchRejected : public std::exception {
+ public:
+ SRMismatchRejected () {}
+ const char* what() const throw() { return "Sample rate mismatch rejected"; }
+ };
+
/* handlers should return !0 for use pending state, 0 for
ignore it.
*/
/* flattening stuff */
- boost::shared_ptr<Region> write_one_audio_track (AudioTrack&, nframes_t start, nframes_t end, bool overwrite, vector<boost::shared_ptr<AudioSource> >&,
- InterThreadInfo& wot);
+ boost::shared_ptr<Region> write_one_audio_track (AudioTrack&, nframes_t start, nframes_t end, bool overwrite, vector<boost::shared_ptr<AudioSource> >&, InterThreadInfo& wot, bool enable_processing = true);
int freeze (InterThreadInfo&);
/* session-wide solo/mute/rec-enable */
void set_audio_range (list<AudioRange>&);
void set_music_range (list<MusicRange>&);
- void request_play_range (bool yn);
+ void request_play_range (bool yn, bool leave_rolling = false);
bool get_play_range () const { return _play_range; }
/* favorite dirs */
nframes_t compute_initial_length ();
+ bool _writable;
+
static const char* _template_suffix;
static const char* _statefile_suffix;
static const char* _pending_suffix;
void process_with_events (nframes_t);
void process_audition (nframes_t);
int process_export (nframes_t, ARDOUR::AudioExportSpecification*);
-
+
+ void block_processing() { g_atomic_int_set (&processing_prohibited, 1); }
+ void unblock_processing() { g_atomic_int_set (&processing_prohibited, 0); }
+ bool processing_blocked() const { return g_atomic_int_get (&processing_prohibited); }
+
/* slave tracking */
static const int delta_accumulator_size = 25;
nframes_t slave_wait_end;
void reset_slave_state ();
- bool follow_slave (nframes_t, nframes_t);
- void set_slave_source (SlaveSource);
+ bool follow_slave (nframes_t);
+ void set_slave_source (SlaveSource, bool stop_transport = true);
bool _exporting;
int prepare_to_export (ARDOUR::AudioExportSpecification&);
void prepare_diskstreams ();
void commit_diskstreams (nframes_t, bool& session_requires_butler);
- int process_routes (nframes_t, nframes_t);
- int silent_process_routes (nframes_t, nframes_t);
+ int process_routes (nframes_t);
+ int silent_process_routes (nframes_t);
bool get_rec_monitors_input () {
if (actively_recording()) {
return false;
}
- bool maybe_sync_start (nframes_t&, nframes_t&);
+ bool maybe_sync_start (nframes_t&);
void check_declick_out ();
bool pending_abort;
bool pending_auto_loop;
- Sample* butler_mixdown_buffer;
- float* butler_gain_buffer;
pthread_t butler_thread;
Glib::Mutex butler_request_lock;
Glib::Cond butler_paused;
nframes_t last_smpte_when;
SMPTE::Time last_smpte;
+ bool _send_smpte_update; ///< Flag to send a full frame (SMPTE) MTC message this cycle
+
int send_full_time_code ();
int send_midi_time_code ();
void reset_record_status ();
- int no_roll (nframes_t nframes, nframes_t offset);
+ int fail_roll (nframes_t nframes);
+ int no_roll (nframes_t nframes);
bool non_realtime_work_pending() const { return static_cast<bool>(post_transport_work); }
bool process_can_proceed() const { return !(post_transport_work & ProcessCannotProceedMask); }
void change_midi_ports ();
int use_config_midi_ports ();
- void set_play_loop (bool yn);
+ void set_play_loop (bool yn, bool leave_rolling);
void overwrite_some_buffers (Diskstream*);
void flush_all_redirects ();
int micro_locate (nframes_t distance);
Click *get_click();
void setup_click_sounds (int which);
void clear_clicks ();
- void click (nframes_t start, nframes_t nframes, nframes_t offset);
+ void click (nframes_t start, nframes_t nframes);
vector<Route*> master_outs;
list<AudioRange> current_audio_range;
bool _play_range;
- void set_play_range (bool yn);
+ void set_play_range (bool yn, bool leave_rolling);
void setup_auto_play ();
/* main outs */
/* used in ::audible_frame() */
mutable bool have_looped;
+
+ static void get_templates_from (const std::string& path, std::list<std::string> &template_names);
};
} // namespace ARDOUR