summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/midi_diskstream.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-21 06:00:15 +0000
committerDavid Robillard <d@drobilla.net>2013-01-21 06:00:15 +0000
commite781c1cf0d4d16cd08b8dc2d9aedb2b6b9d8cf71 (patch)
tree7c0cce1bef5968dfef0ca666344a61a58e415f05 /libs/ardour/ardour/midi_diskstream.h
parent76547b5c4b7fb2d4fbb7db9f12427b439da34a43 (diff)
Fix MIDI loop recording.
This changes how things work a bit, but I am committing it for 3.0 since the previous revision often crashed (and never worked), this one seems to work fine, and the code is quite a bit more cogent. I have tested the following use cases with live input and audible output: * Non-loop recording, armed before roll * Non-loop recording, arm while rolling * Loop recording, armed before roll * Loop recording, arm during roll In the last case, the source/region is created starting at the loop start rather than the current transport frame as usual so time makes sense when it wraps around. See the documentation added to the code for details, but the basic idea here is to simply push MIDI events to the source with increasing monotonic time, ignoring looping altogether. Essentially we pretend the loop does not exist, but the source knows all the details so it can implement whatever behaviour is appropriate. Currently, this is simply recording a complete non-destructive copy of the input, which is a good thing. Perhaps not what the user expects of loop recording, but at least it works and is one sensible option. We will need to add more later. Display while recording is a little bit wacky, but whatever. git-svn-id: svn://localhost/ardour2/branches/3.0@13940 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/midi_diskstream.h')
-rw-r--r--libs/ardour/ardour/midi_diskstream.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/ardour/ardour/midi_diskstream.h b/libs/ardour/ardour/midi_diskstream.h
index 45ea975ea9..be0e0fe48c 100644
--- a/libs/ardour/ardour/midi_diskstream.h
+++ b/libs/ardour/ardour/midi_diskstream.h
@@ -195,6 +195,7 @@ class MidiDiskstream : public Diskstream
volatile gint _frames_written_to_ringbuffer;
volatile gint _frames_read_from_ringbuffer;
volatile gint _frames_pending_write;
+ volatile gint _num_captured_loops;
/** A buffer that we use to put newly-arrived MIDI data in for
the GUI to read (so that it can update itself).