summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_diskstream.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-10-09 15:50:44 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-10-09 15:50:44 +0000
commit0d0f71ee92fb7ce53fbcb8c7b0cd93b1cdf3529f (patch)
treeae37075200040cbbd430b98ee3cbce59eaef51ca /libs/ardour/audio_diskstream.cc
parent8011cbf5f8e4181ac39e4140e681fcad531f4a7c (diff)
fix abort-capture path, including many subtle issues with shared_ptr<>; remove old automation feedback code; make new automation feedback code slightly configurable ; fix zoom focus options for playhead + edit cursor ; prevent zoom < 2 samples per pixel to avoid crashes ; peak building now uses shared_ptr<Source> not Source*
git-svn-id: svn://localhost/ardour2/trunk@959 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/audio_diskstream.cc')
-rw-r--r--libs/ardour/audio_diskstream.cc31
1 files changed, 10 insertions, 21 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc
index 1374589608..9bd690c23a 100644
--- a/libs/ardour/audio_diskstream.cc
+++ b/libs/ardour/audio_diskstream.cc
@@ -1484,29 +1484,21 @@ AudioDiskstream::transport_stopped (struct tm& when, time_t twhen, bool abort_ca
if (abort_capture) {
- ChannelList::iterator chan;
-
- list<boost::shared_ptr<Source> >* deletion_list = new list<boost::shared_ptr<Source> >;
+ if (destructive()) {
+ goto outout;
+ }
- for ( chan = channels.begin(); chan != channels.end(); ++chan) {
+ for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan) {
if ((*chan).write_source) {
(*chan).write_source->mark_for_remove ();
-
- deletion_list->push_back ((*chan).write_source);
-
+ (*chan).write_source->drop_references ();
(*chan).write_source.reset ();
}
/* new source set up in "out" below */
}
-
- if (!deletion_list->empty()) {
- DeleteSources (deletion_list);
- } else {
- delete deletion_list;
- }
goto out;
}
@@ -1606,9 +1598,11 @@ AudioDiskstream::transport_stopped (struct tm& when, time_t twhen, bool abort_ca
mark_write_completed = true;
+ out:
reset_write_sources (mark_write_completed);
- out:
+ outout:
+
for (ci = capture_info.begin(); ci != capture_info.end(); ++ci) {
delete *ci;
}
@@ -1933,13 +1927,8 @@ AudioDiskstream::use_new_write_source (uint32_t n)
ChannelInfo &chan = channels[n];
if (chan.write_source) {
-
- if (AudioFileSource::is_empty (_session, chan.write_source->path())) {
- chan.write_source->mark_for_remove ();
- chan.write_source.reset ();
- } else {
- chan.write_source.reset ();
- }
+ chan.write_source->set_allow_remove_if_empty (true);
+ chan.write_source.reset ();
}
try {