summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-08-04 00:01:55 +0000
committerCarl Hetherington <carl@carlh.net>2010-08-04 00:01:55 +0000
commitaa72da4f9ffc2f7011c2e7f801fb5c04ecbfa58f (patch)
tree39639bbadeeb6d8613ad7eefd8cbb4deafbb636c /libs
parent6b641cdde4fa01baa1bf03e69131bd2b1a81b67b (diff)
Fix peakfile display after record. Fixes at least part of #3374.
git-svn-id: svn://localhost/ardour2/branches/3.0@7534 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/audio_diskstream.cc19
1 files changed, 8 insertions, 11 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc
index 0f485e73c8..e9d4374a71 100644
--- a/libs/ardour/audio_diskstream.cc
+++ b/libs/ardour/audio_diskstream.cc
@@ -1878,12 +1878,6 @@ AudioDiskstream::use_new_write_source (uint32_t n)
ChannelInfo* chan = (*c)[n];
- if (chan->write_source) {
- chan->write_source->done_with_peakfile_writes ();
- chan->write_source->set_allow_remove_if_empty (true);
- chan->write_source.reset ();
- }
-
try {
/* file starts off as a stub file, it will be converted
when we're done with a capture pass.
@@ -1934,16 +1928,19 @@ AudioDiskstream::reset_write_sources (bool mark_write_complete, bool /*force*/)
if (!destructive()) {
- if ((*chan)->write_source && mark_write_complete) {
- (*chan)->write_source->mark_streaming_write_completed ();
- }
+ if ((*chan)->write_source) {
+
+ if (mark_write_complete) {
+ (*chan)->write_source->mark_streaming_write_completed ();
+ (*chan)->write_source->done_with_peakfile_writes ();
+ }
- if ((*chan)->write_source) {
if ((*chan)->write_source->removable()) {
(*chan)->write_source->mark_for_remove ();
(*chan)->write_source->drop_references ();
_session.remove_source ((*chan)->write_source);
- }
+ }
+
(*chan)->write_source.reset ();
}