summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-01-08 05:19:38 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-01-08 05:19:38 +0000
commitd20534e846dbbf3b039903e94741f38c9b238a9a (patch)
tree2985b07a49c91be044af0f26bb77ebd2ecceae85 /libs/ardour/ardour
parenta20f41ab39cc034740ccd564c1057d8737d763d5 (diff)
add destructive outlines, more action usage and state fixups in GUI
git-svn-id: svn://localhost/trunk/ardour2@247 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/audio_track.h8
-rw-r--r--libs/ardour/ardour/destructive_filesource.h52
-rw-r--r--libs/ardour/ardour/diskstream.h13
-rw-r--r--libs/ardour/ardour/filesource.h2
-rw-r--r--libs/ardour/ardour/session.h2
5 files changed, 67 insertions, 10 deletions
diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h
index e7ba315e45..81ca8834b3 100644
--- a/libs/ardour/ardour/audio_track.h
+++ b/libs/ardour/ardour/audio_track.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002 Paul Davis
+ Copyright (C) 2002-2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -56,6 +56,10 @@ class AudioTrack : public Route
int use_diskstream (string name);
int use_diskstream (id_t id);
+ bool destructive() const { return _destructive; }
+ void set_destructive (bool yn);
+ sigc::signal<void> DestructiveChanged;
+
jack_nframes_t update_total_latency();
void set_latency_delay (jack_nframes_t);
@@ -155,6 +159,8 @@ class AudioTrack : public Route
};
MIDIRecEnableControl _midi_rec_enable_control;
+
+ bool _destructive;
};
}; /* namespace ARDOUR*/
diff --git a/libs/ardour/ardour/destructive_filesource.h b/libs/ardour/ardour/destructive_filesource.h
new file mode 100644
index 0000000000..7f816a9e6b
--- /dev/null
+++ b/libs/ardour/ardour/destructive_filesource.h
@@ -0,0 +1,52 @@
+/*
+ Copyright (C) 2006 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __ardour_destructive_file_source_h__
+#define __ardour_destructive_file_source_h__
+
+#include <string>
+
+#include <ardour/filesource.h>
+
+struct tm;
+
+namespace ARDOUR {
+
+class DestructiveFileSource : public FileSource {
+ public:
+ DestructiveFileSource (std::string path, jack_nframes_t rate, bool repair_first = false);
+ DestructiveFileSource (const XMLNode&, jack_nframes_t rate);
+ ~DestructiveFileSource ();
+
+ int seek (jack_nframes_t frame);
+ void mark_capture_start ();
+ void mark_capture_end ();
+ void clear_capture_marks();
+
+ jack_nframes_t write (Sample *src, jack_nframes_t cnt);
+
+ private:
+ bool _capture_start;
+ bool _capture_end;
+};
+
+}
+
+#endif /* __ardour_destructive_file_source_h__ */
diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h
index 0cdbfd1724..5b63cfad28 100644
--- a/libs/ardour/ardour/diskstream.h
+++ b/libs/ardour/ardour/diskstream.h
@@ -60,7 +60,8 @@ class DiskStream : public Stateful, public sigc::trackable
public:
enum Flag {
Recordable = 0x1,
- Hidden = 0x2
+ Hidden = 0x2,
+ Destructive = 0x4
};
DiskStream (Session &, const string& name, Flag f = Recordable);
@@ -92,6 +93,9 @@ class DiskStream : public Stateful, public sigc::trackable
bool hidden() const { return _flags & Hidden; }
bool recordable() const { return _flags & Recordable; }
+ bool destructive() const { return _flags & Destructive; }
+
+ void set_destructive (bool yn);
jack_nframes_t roll_delay() const { return _roll_delay; }
void set_roll_delay (jack_nframes_t);
@@ -150,11 +154,6 @@ class DiskStream : public Stateful, public sigc::trackable
AudioPlaylist *playlist () { return _playlist; }
- FileSource *fades_source (uint32_t n=0) {
- if (n < channels.size())
- return channels[n].fades_source;
- return 0;
- }
FileSource *write_source (uint32_t n=0) {
if (n < channels.size())
return channels[n].write_source;
@@ -245,7 +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);
- void reset_write_sources (bool);
+ void reset_write_sources (bool, bool force = false);
void non_realtime_input_change ();
uint32_t read_data_count() const { return _read_data_count; }
diff --git a/libs/ardour/ardour/filesource.h b/libs/ardour/ardour/filesource.h
index 75f454f554..fc86656c2e 100644
--- a/libs/ardour/ardour/filesource.h
+++ b/libs/ardour/ardour/filesource.h
@@ -72,7 +72,7 @@ class FileSource : public Source {
static void set_search_path (string);
- private:
+ protected:
int fd;
string _path;
bool remove_at_unref;
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 0b13cf5f30..775dbc8ea9 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -686,7 +686,7 @@ class Session : public sigc::trackable, public Stateful
sigc::signal<void,Source *> SourceAdded;
sigc::signal<void,Source *> SourceRemoved;
- FileSource *create_file_source (ARDOUR::DiskStream&, int32_t chan);
+ FileSource *create_file_source (ARDOUR::DiskStream&, int32_t chan, bool destructive);
Source *get_source (ARDOUR::id_t);
/* playlist management */