diff options
author | David Robillard <d@drobilla.net> | 2010-12-21 00:04:58 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-21 00:04:58 +0000 |
commit | 384c418ae0181f413ae85b06d11b244352ee74a6 (patch) | |
tree | 41df0c4c841d6034c44172da8a58e043e1cecf81 /libs/ardour/midi_diskstream.cc | |
parent | fe79c4272531a426358f896053045f371da8baa7 (diff) |
Set new (recorded) MIDI source length to length of entire capture (instead of length from start to last actual recorded event).
Precisely set length_beats of newly captured MIDI regions to source length in beats (no conversion).
git-svn-id: svn://localhost/ardour2/branches/3.0@8317 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_diskstream.cc')
-rw-r--r-- | libs/ardour/midi_diskstream.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc index 7227c8ba2e..c3f85438db 100644 --- a/libs/ardour/midi_diskstream.cc +++ b/libs/ardour/midi_diskstream.cc @@ -968,6 +968,12 @@ MidiDiskstream::transport_stopped_wallclock (struct tm& /*when*/, time_t /*twhen _write_source->mark_streaming_write_completed (); + /* set length in beats to entire capture length */ + + BeatsFramesConverter converter (_session.tempo_map(), capture_info.front()->start); + const double total_capture_beats = converter.from(total_capture); + _write_source->set_length_beats(total_capture_beats); + /* make it not a stub anymore */ _write_source->unstubify (); |