summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_diskstream.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/audio_diskstream.cc')
-rw-r--r--libs/ardour/audio_diskstream.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc
index eeaa095fbd..2c878fbd4d 100644
--- a/libs/ardour/audio_diskstream.cc
+++ b/libs/ardour/audio_diskstream.cc
@@ -526,6 +526,8 @@ AudioDiskstream::process (nframes_t transport_frame, nframes_t nframes, nframes_
return 0;
}
+ commit_should_unlock = false;
+
check_record_status (transport_frame, nframes, can_record);
nominally_recording = (can_record && re);
@@ -544,7 +546,7 @@ AudioDiskstream::process (nframes_t transport_frame, nframes_t nframes, nframes_
if (!state_lock.trylock()) {
return 1;
}
-
+ commit_should_unlock = true;
adjust_capture_position = 0;
for (chan = c->begin(); chan != c->end(); ++chan) {
@@ -796,6 +798,7 @@ AudioDiskstream::process (nframes_t transport_frame, nframes_t nframes, nframes_
be called. unlock the state lock.
*/
+ commit_should_unlock = false;
state_lock.unlock();
}
@@ -835,7 +838,10 @@ AudioDiskstream::commit (nframes_t nframes)
|| c->front()->capture_buf->read_space() >= disk_io_chunk_frames;
}
- state_lock.unlock();
+ if (commit_should_unlock) {
+ state_lock.unlock();
+ }
+
_processed = false;
return need_butler;