#include "pbd/error.h"
#include "pbd/event_loop.h"
+#include "pbd/file_archive.h"
#include "pbd/rcu.h"
#include "pbd/reallocpool.h"
#include "pbd/statefuldestructible.h"
class Return;
class Route;
class RouteGroup;
+class RTTaskList;
class SMFSource;
class Send;
class SceneChanger;
return routes.reader ();
}
+ boost::shared_ptr<RTTaskList> rt_tasklist () { return _rt_tasklist; }
+
CoreSelection& selection () { return *_selection; }
/* because the set of Stripables consists of objects managed
};
int save_as (SaveAs&);
+
/** save session
* @param snapshot_name name of the session (use an empty string for the current name)
* @param pending save a 'recovery', not full state (default: false)
* @param template_only save a session template (default: false)
* @return zero on success
*/
- int save_state (std::string snapshot_name, bool pending = false, bool switch_to_snapshot = false, bool template_only = false);
+ int save_state (std::string snapshot_name,
+ bool pending = false,
+ bool switch_to_snapshot = false,
+ bool template_only = false,
+ bool for_archive = false,
+ bool only_used_assets = false);
enum ArchiveEncode {
NO_ENCODE,
FLAC_24BIT
};
- int archive_session (const std::string&, const std::string&, ArchiveEncode compress_audio = FLAC_16BIT, bool only_used_sources = false, Progress* p = 0);
+ int archive_session (const std::string&, const std::string&,
+ ArchiveEncode compress_audio = FLAC_16BIT,
+ PBD::FileArchive::CompressionLevel compression_level = PBD::FileArchive::CompressGood,
+ bool only_used_sources = false,
+ Progress* p = 0);
int restore_state (std::string snapshot_name);
int save_template (const std::string& template_name, const std::string& description = "", bool replace_existing = false);
std::vector<std::string> possible_states() const;
static std::vector<std::string> possible_states (std::string path);
- XMLNode& get_state();
- int set_state(const XMLNode& node, int version); // not idempotent
- XMLNode& get_template();
- bool export_track_state (boost::shared_ptr<RouteList> rl, const std::string& path);
+ bool export_track_state (boost::shared_ptr<RouteList> rl, const std::string& path);
/// The instant xml file is written to the session directory
void add_instant_xml (XMLNode&, bool write_to_config = true);
bool synced_to_mtc () const { return config.get_external_sync() && Config->get_sync_source() == MTC && g_atomic_int_get (const_cast<gint*>(&_mtc_active)); }
bool synced_to_ltc () const { return config.get_external_sync() && Config->get_sync_source() == LTC && g_atomic_int_get (const_cast<gint*>(&_ltc_active)); }
+ double engine_speed() const { return _engine_speed; }
+ double actual_speed() const {
+ if (_transport_speed > 0) return _engine_speed;
+ if (_transport_speed < 0) return - _engine_speed;
+ return 0;
+ }
double transport_speed() const { return _count_in_samples > 0 ? 0. : _transport_speed; }
bool transport_stopped() const { return _transport_speed == 0.0; }
bool transport_rolling() const { return _transport_speed != 0.0 && _count_in_samples == 0 && _remaining_latency_preroll == 0; }
/* preroll */
samplecnt_t preroll_samples (samplepos_t) const;
- void request_preroll_record_punch (samplepos_t start, samplecnt_t preroll);
void request_preroll_record_trim (samplepos_t start, samplecnt_t preroll);
void request_count_in_record ();
- samplepos_t preroll_record_punch_pos () const { return _preroll_record_punch_pos; }
- bool preroll_record_punch_enabled () const { return _preroll_record_punch_pos >= 0; }
-
samplecnt_t preroll_record_trim_len () const { return _preroll_record_trim_len; }
/* temporary hacks to allow selection to be pushed from GUI into backend.
samplecnt_t _remaining_latency_preroll;
// varispeed playback
+ double _engine_speed;
double _transport_speed;
double _default_transport_speed;
double _last_transport_speed;
gint _suspend_save; /* atomic */
volatile bool _save_queued;
Glib::Threads::Mutex save_state_lock;
+ Glib::Threads::Mutex save_source_lock;
Glib::Threads::Mutex peak_cleanup_lock;
int load_options (const XMLNode&);
SwitchToSnapshot
};
- XMLNode& state(bool, snapshot_t snapshot_type = NormalSave);
+ XMLNode& state (bool save_template,
+ snapshot_t snapshot_type = NormalSave,
+ bool only_used_assets = false);
+
+ XMLNode& get_state ();
+ int set_state (const XMLNode& node, int version); // not idempotent
+ XMLNode& get_template ();
/* click track */
typedef std::list<Click*> Clicks;
Evoral::Range<samplepos_t> _range_selection;
Evoral::Range<samplepos_t> _object_selection;
- void unset_preroll_record_punch ();
void unset_preroll_record_trim ();
- samplepos_t _preroll_record_punch_pos;
samplecnt_t _preroll_record_trim_len;
bool _count_in_once;
boost::shared_ptr<IO> _ltc_input;
boost::shared_ptr<IO> _ltc_output;
+ boost::shared_ptr<RTTaskList> _rt_tasklist;
+
/* Scene Changing */
SceneChanger* _scene_changer;