mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-30 17:03:06 +01:00
Re-fix problems when zero-length MIDI regions are created by an import. Set those regions to have the length of one beat, rather than 1 frame, so that the length doesn't get rounded back down to 0 by frames/beats conversions (bug #4000).
git-svn-id: svn://localhost/ardour2/branches/3.0@9549 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
ba51f635f7
commit
84aeb92d15
1 changed files with 6 additions and 2 deletions
|
|
@ -760,10 +760,14 @@ Editor::add_sources (vector<string> paths, SourceList& sources, framepos_t& pos,
|
|||
|
||||
PropertyList plist;
|
||||
|
||||
/* Fudge region length to ensure it is non-zero */
|
||||
/* Fudge region length to ensure it is non-zero; make it 1 beat at 120bpm
|
||||
for want of a better idea. It can't be too small, otherwise if this
|
||||
is a MIDI region the conversion from frames -> beats -> frames will
|
||||
round it back down to 0 again.
|
||||
*/
|
||||
framecnt_t len = (*x)->length (pos);
|
||||
if (len == 0) {
|
||||
len = 1;
|
||||
len = (60 / 120) * _session->frame_rate ();
|
||||
}
|
||||
|
||||
plist.add (ARDOUR::Properties::start, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue