summaryrefslogtreecommitdiff
path: root/libs/ardour/diskstream.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-10-08 14:54:16 +0000
committerCarl Hetherington <carl@carlh.net>2010-10-08 14:54:16 +0000
commitba0458cf1f6c69366e89631d8fff916ad183d768 (patch)
tree47bc77224638eac6d7a9e8179e03e5fa0a142665 /libs/ardour/diskstream.cc
parenta029a112a6e370082e89b74cb94089505a9323af (diff)
Update recorded MIDI regions as notes arrive. Fixes one cause of infinite note-lengths during record. Fix various problems with multiple captures of MIDI during one pass.
git-svn-id: svn://localhost/ardour2/branches/3.0@7887 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/diskstream.cc')
-rw-r--r--libs/ardour/diskstream.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc
index 2c1877b7b5..908e1db5c8 100644
--- a/libs/ardour/diskstream.cc
+++ b/libs/ardour/diskstream.cc
@@ -293,32 +293,35 @@ Diskstream::set_loop (Location *location)
loop_location = location;
- LoopSet (location); /* EMIT SIGNAL */
+ LoopSet (location); /* EMIT SIGNAL */
return 0;
}
+/** Get the start position (in session frames) of the nth capture in the current pass */
ARDOUR::framepos_t
-Diskstream::get_capture_start_frame (uint32_t n)
+Diskstream::get_capture_start_frame (uint32_t n) const
{
Glib::Mutex::Lock lm (capture_info_lock);
if (capture_info.size() > n) {
+ /* this is a completed capture */
return capture_info[n]->start;
- }
- else {
+ } else {
+ /* this is the currently in-progress capture */
return capture_start_frame;
}
}
ARDOUR::framecnt_t
-Diskstream::get_captured_frames (uint32_t n)
+Diskstream::get_captured_frames (uint32_t n) const
{
Glib::Mutex::Lock lm (capture_info_lock);
if (capture_info.size() > n) {
+ /* this is a completed capture */
return capture_info[n]->frames;
- }
- else {
+ } else {
+ /* this is the currently in-progress capture */
return capture_captured;
}
}