summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_diskstream.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-12-18 04:03:39 -0500
committerDavid Robillard <d@drobilla.net>2014-12-18 04:03:39 -0500
commit7eab4c6f339777a0e5bd202ff851bdce466cb183 (patch)
treee6d1aa290052628158f101455688ae052f23d56f /libs/ardour/audio_diskstream.cc
parente584ae0bf94673bf719e661c49e8a2f2d2dd0346 (diff)
Don't assume compiler can avoid copy to const ref.
Diffstat (limited to 'libs/ardour/audio_diskstream.cc')
-rw-r--r--libs/ardour/audio_diskstream.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc
index eb85538811..70ffa1831c 100644
--- a/libs/ardour/audio_diskstream.cc
+++ b/libs/ardour/audio_diskstream.cc
@@ -1771,15 +1771,15 @@ AudioDiskstream::prep_record_enable ()
for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
(*chan)->source.request_input_monitoring (!(_session.config.get_auto_input() && rolling));
capturing_sources.push_back ((*chan)->write_source);
- (*chan)->write_source->mark_streaming_write_started (
- Source::Lock((*chan)->write_source->mutex()));
+ Source::Lock lock((*chan)->write_source->mutex());
+ (*chan)->write_source->mark_streaming_write_started (lock);
}
} else {
for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
capturing_sources.push_back ((*chan)->write_source);
- (*chan)->write_source->mark_streaming_write_started (
- Source::Lock((*chan)->write_source->mutex()));
+ Source::Lock lock((*chan)->write_source->mutex());
+ (*chan)->write_source->mark_streaming_write_started (lock);
}
}
@@ -1965,8 +1965,8 @@ AudioDiskstream::reset_write_sources (bool mark_write_complete, bool /*force*/)
if ((*chan)->write_source) {
if (mark_write_complete) {
- (*chan)->write_source->mark_streaming_write_completed (
- Source::Lock((*chan)->write_source->mutex()));
+ Source::Lock lock((*chan)->write_source->mutex());
+ (*chan)->write_source->mark_streaming_write_completed (lock);
(*chan)->write_source->done_with_peakfile_writes ();
}