diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-02-20 14:11:46 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-02-20 14:12:40 -0500 |
commit | 7024232855d268633760674d34c096ce447b7240 (patch) | |
tree | 2cceb1d0528f49ebe44fa9c8013c8100bb0ec6e9 /libs/ardour/audio_diskstream.cc | |
parent | dcf69ab3e6795604c17bd8a21cebecfe4448df20 (diff) |
ensure that stub audio file sources are removed when we destroy a track
Diffstat (limited to 'libs/ardour/audio_diskstream.cc')
-rw-r--r-- | libs/ardour/audio_diskstream.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index cf3f550ac4..2d4d02f830 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -2445,6 +2445,24 @@ AudioDiskstream::ChannelInfo::resize_capture (framecnt_t capture_bufsize) AudioDiskstream::ChannelInfo::~ChannelInfo () { + if (write_source) { + if (write_source->removable()) { + /* this is a "stub" write source which exists in the + Session source list, but is removable. We must emit + a drop references call because it should not + continue to exist. If we do not do this, then the + Session retains a reference to it, it is not + deleted, and later attempts to create a new source + file will use wierd naming because it already + exists. + + XXX longer term TO-DO: do not add to session source + list until we write to the source. + */ + write_source->drop_references (); + } + } + write_source.reset (); delete [] speed_buffer; |