summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_diskstream.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-12 23:20:37 +0000
committerDavid Robillard <d@drobilla.net>2007-04-12 23:20:37 +0000
commit959a7909c1adca430a63f783fd16687242a7be3d (patch)
treeb5048c3cc1bbb60bb680472b97ebba6ebb92d72f /libs/ardour/audio_diskstream.cc
parent96ca08b9257e4048294cd1804a65d4ae6cd88814 (diff)
Merged with trunk R1705.
Synced .po files with trunk. Fixed more editor operations to be type agnostic (ie not audio only). git-svn-id: svn://localhost/ardour2/branches/midi@1709 d708f5d6-7413-0410-9779-e7cbd77b26cf
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;