summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-03-17 17:39:21 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-03-17 17:39:21 +0000
commit5e836403adcb62a59141226baa32515ae7789661 (patch)
tree40e47327306f1328f504ce16b81981206572af5d /libs/ardour/ardour
parent6097ce578b9dc4d51f421c2e4cca2de64948aa66 (diff)
lots of fidgety work to get track renaming to work correctly now that we have to rename audio files too; some GUI tweaks
git-svn-id: svn://localhost/trunk/ardour2@404 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/diskstream.h3
-rw-r--r--libs/ardour/ardour/filesource.h8
-rw-r--r--libs/ardour/ardour/session.h4
-rw-r--r--libs/ardour/ardour/source.h6
4 files changed, 14 insertions, 7 deletions
diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h
index a163c125d7..a0436696b0 100644
--- a/libs/ardour/ardour/diskstream.h
+++ b/libs/ardour/ardour/diskstream.h
@@ -100,7 +100,7 @@ class DiskStream : public Stateful, public sigc::trackable
jack_nframes_t roll_delay() const { return _roll_delay; }
void set_roll_delay (jack_nframes_t);
- void set_name (string str, void* src);
+ int set_name (string str, void* src);
string input_source (uint32_t n=0) const {
if (n < channels.size()) {
@@ -244,6 +244,7 @@ class DiskStream : public Stateful, public sigc::trackable
void set_block_size (jack_nframes_t);
int internal_playback_seek (jack_nframes_t distance);
int can_internal_playback_seek (jack_nframes_t distance);
+ int rename_write_sources ();
void reset_write_sources (bool, bool force = false);
void non_realtime_input_change ();
diff --git a/libs/ardour/ardour/filesource.h b/libs/ardour/ardour/filesource.h
index af46596ec5..c7ae97c281 100644
--- a/libs/ardour/ardour/filesource.h
+++ b/libs/ardour/ardour/filesource.h
@@ -54,12 +54,15 @@ class FileSource : public Source {
FileSource (const XMLNode&, jack_nframes_t rate);
~FileSource ();
+ int set_name (std::string str, bool destructive);
+
+ void set_allow_remove_if_empty (bool yn);
+
jack_nframes_t length() const { return _length; }
jack_nframes_t read (Sample *dst, jack_nframes_t start, jack_nframes_t cnt, char * workbuf) const;
jack_nframes_t write (Sample *src, jack_nframes_t cnt, char * workbuf);
void mark_for_remove();
string peak_path(string audio_path);
- string old_peak_path(string audio_path);
string path() const { return _path; }
virtual int seek (jack_nframes_t frame) {return 0; }
@@ -93,7 +96,8 @@ class FileSource : public Source {
string _take_id;
SampleFormat _sample_format;
int _sample_size;
-
+ bool allow_remove_if_empty;
+
static char bwf_country_code[3];
static char bwf_organization_code[4];
static char bwf_serial_number[13];
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index d0da2fef26..24f15e97f5 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -253,8 +253,9 @@ class Session : public sigc::trackable, public Stateful
static string template_dir ();
static void get_template_list (list<string>&);
+ 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);
@@ -1498,6 +1499,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&);
diff --git a/libs/ardour/ardour/source.h b/libs/ardour/ardour/source.h
index 7a5e2eb23a..88a478a420 100644
--- a/libs/ardour/ardour/source.h
+++ b/libs/ardour/ardour/source.h
@@ -56,6 +56,7 @@ class Source : public Stateful, public sigc::trackable
virtual ~Source ();
const string& name() const { return _name; }
+
ARDOUR::id_t id() const { return _id; }
/* returns the number of items in this `source' */
@@ -103,10 +104,11 @@ class Source : public Stateful, public sigc::trackable
XMLNode& get_state ();
int set_state (const XMLNode&);
-
static int start_peak_thread ();
static void stop_peak_thread ();
+ int rename_peakfile (std::string newpath);
+
static void set_build_missing_peakfiles (bool yn) {
_build_missing_peakfiles = yn;
}
@@ -125,7 +127,6 @@ class Source : public Stateful, public sigc::trackable
jack_nframes_t _length;
bool next_peak_clear_should_notify;
string peakpath;
- int peakfile; /* fd */
time_t _timestamp;
string _captured_for;
@@ -138,7 +139,6 @@ class Source : public Stateful, public sigc::trackable
int do_build_peak (jack_nframes_t, jack_nframes_t);
virtual jack_nframes_t read_unlocked (Sample *dst, jack_nframes_t start, jack_nframes_t cnt, char * workbuf) const = 0;
virtual string peak_path(string audio_path) = 0;
- virtual string old_peak_path(string audio_path) = 0;
static pthread_t peak_thread;
static bool have_peak_thread;