diff options
author | Carl Hetherington <carl@carlh.net> | 2011-05-08 23:45:26 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-05-08 23:45:26 +0000 |
commit | d901dbccc912314b54494fab068785c188884fe4 (patch) | |
tree | c1233ee42710a6f0384bef250df8c3e7671ac284 /libs/ardour/audio_diskstream.cc | |
parent | 143dddd9a76ef23544b2ee61c8778a44b96badb0 (diff) |
Make a new write source when the diskstream name changes so that sources don't get a name which includes the old name.
git-svn-id: svn://localhost/ardour2/branches/3.0@9485 d708f5d6-7413-0410-9779-e7cbd77b26cf
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 1327914085..109dfe41ed 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -2359,3 +2359,21 @@ AudioDiskstream::ChannelInfo::~ChannelInfo () capture_transition_buf = 0; } + +bool +AudioDiskstream::set_name (string const & name) +{ + Diskstream::set_name (name); + + /* get a new write source so that its name reflects the new diskstream name */ + + boost::shared_ptr<ChannelList> c = channels.reader(); + ChannelList::iterator i; + int n = 0; + + for (n = 0, i = c->begin(); i != c->end(); ++i, ++n) { + use_new_write_source (n); + } + + return true; +} |