X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fsession.h;h=1e25c5f38bdf66d0f3c1cfc4de7892eb6bd68670;hb=2f53112e83ff46ed535696a940e0bd5258a4fe66;hp=d4ca8c1ddc1a9cb5a36d770953fb59f133316ea9;hpb=9ab70fb55284537228577d575f15aa03949bd678;p=ardour.git diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index d4ca8c1ddc..1e25c5f38b 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -243,22 +243,25 @@ class Session : public sigc::trackable, public Stateful bool dirty() const { return _state_of_the_state & Dirty; } sigc::signal DirtyChanged; - string sound_dir () const; - string peak_dir () const; - string dead_sound_dir () const; - string automation_dir () const; + std::string sound_dir () const; + std::string tape_dir () const; + std::string peak_dir () const; + std::string dead_sound_dir () const; + std::string automation_dir () const; static string template_path (); static string template_dir (); static void get_template_list (list&); + static string change_audio_path_by_name (string oldpath, string oldname, string newname, bool destructive); static string peak_path_from_audio_path (string); - static string old_peak_path_from_audio_path (string); + string audio_path_from_name (string, uint32_t nchans, uint32_t chan, bool destructive); void process (jack_nframes_t nframes); vector& get_passthru_buffers() { return _passthru_buffers; } vector& get_silent_buffers (uint32_t howmany); + vector& get_send_buffers () { return _send_buffers; } DiskStream *diskstream_by_id (id_t id); DiskStream *diskstream_by_name (string name); @@ -317,7 +320,7 @@ class Session : public sigc::trackable, public Stateful bool record_enabling_legal () const; void maybe_enable_record (); - void disable_record (bool force = false); + void disable_record (bool rt_context, bool force = false); void step_back_from_record (); sigc::signal going_away; @@ -351,7 +354,7 @@ class Session : public sigc::trackable, public Stateful void request_auto_loop (bool yn); jack_nframes_t last_transport_start() const { return _last_roll_location; } void goto_end () { request_locate (end_location->start(), false);} - void goto_start () { request_locate (0, false); } + void goto_start () { request_locate (start_location->start(), false); } void use_rf_shuttle_speed (); void request_transport_speed (float speed); void request_overwrite_buffer (DiskStream*); @@ -364,6 +367,7 @@ class Session : public sigc::trackable, public Stateful int remove_region_from_region_list (Region&); jack_nframes_t current_end_frame() const { return end_location->start(); } + jack_nframes_t current_start_frame() const { return start_location->start(); } jack_nframes_t frame_rate() const { return _current_frame_rate; } double frames_per_smpte_frame() const { return _frames_per_smpte_frame; } jack_nframes_t frames_per_hour() const { return _frames_per_hour; } @@ -503,23 +507,26 @@ class Session : public sigc::trackable, public Stateful RouteGroup* add_edit_group (string); RouteGroup* add_mix_group (string); + void remove_edit_group (RouteGroup&); + void remove_mix_group (RouteGroup&); + RouteGroup *mix_group_by_name (string); RouteGroup *edit_group_by_name (string); sigc::signal edit_group_added; sigc::signal mix_group_added; + sigc::signal edit_group_removed; + sigc::signal mix_group_removed; - template void foreach_edit_group (T *obj, void (T::*func)(RouteGroup *)) { - list::iterator i; - for (i = edit_groups.begin(); i != edit_groups.end(); i++) { - (obj->*func)(*i); + void foreach_edit_group (sigc::slot sl) { + for (list::iterator i = edit_groups.begin(); i != edit_groups.end(); i++) { + sl (*i); } } - template void foreach_mix_group (T *obj, void (T::*func)(RouteGroup *)) { - list::iterator i; - for (i = mix_groups.begin(); i != mix_groups.end(); i++) { - (obj->*func)(*i); + void foreach_mix_group (sigc::slot sl) { + for (list::iterator i = mix_groups.begin(); i != mix_groups.end(); i++) { + sl (*i); } } @@ -633,13 +640,17 @@ class Session : public sigc::trackable, public Stateful /* source management */ struct import_status : public InterThreadInfo { - string doing_what; - - /* control info */ - bool multichan; - bool sample_convert; - volatile bool freeze; - string pathname; + string doing_what; + + /* control info */ + bool multichan; + bool sample_convert; + volatile bool freeze; + string pathname; + + /* result */ + std::vector new_regions; + }; int import_audiofile (import_status&); @@ -997,6 +1008,7 @@ class Session : public sigc::trackable, public Stateful atomic_t _record_status; jack_nframes_t _transport_frame; Location* end_location; + Location* start_location; Slave *_slave; SlaveSource _slave_type; volatile float _transport_speed; @@ -1007,7 +1019,8 @@ class Session : public sigc::trackable, public Stateful jack_nframes_t last_stop_frame; vector _passthru_buffers; vector _silent_buffers; - map _conversion_buffers; + vector _send_buffers; + map _conversion_buffers; jack_nframes_t current_block_size; jack_nframes_t _worst_output_latency; jack_nframes_t _worst_input_latency; @@ -1490,6 +1503,7 @@ class Session : public sigc::trackable, public Stateful RouteList routes; mutable PBD::NonBlockingRWLock route_lock; void add_route (Route*); + uint32_t destructive_index; int load_routes (const XMLNode&); Route* XMLRouteFactory (const XMLNode&); @@ -1618,10 +1632,11 @@ class Session : public sigc::trackable, public Stateful PBD::Lock space_lock; static const char* sound_dir_name; + static const char* tape_dir_name; static const char* dead_sound_dir_name; static const char* peak_dir_name; - string discover_best_sound_dir (); + string discover_best_sound_dir (bool destructive = false); int ensure_sound_dir (string, string&); void refresh_disk_space ();