Fix up hack to cope with zero-length imported MIDI regions so that it actually works.
authorCarl Hetherington <carl@carlh.net>
Sat, 9 Jun 2012 15:04:18 +0000 (15:04 +0000)
committerCarl Hetherington <carl@carlh.net>
Sat, 9 Jun 2012 15:04:18 +0000 (15:04 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@12629 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_audio_import.cc

index bfb44aa5f3f5def7459dcfd20d8840e86d81081d..96e42f9f0fe96ed0e7c04c8832c8cea749338843 100644 (file)
@@ -788,7 +788,7 @@ Editor::add_sources (vector<string> paths, SourceList& sources, framepos_t& pos,
                        */
                        framecnt_t len = (*x)->length (pos);
                        if (len == 0) {
-                               len = (60 / 120) * _session->frame_rate ();
+                               len = (60.0 / 120.0) * _session->frame_rate ();
                        }
 
                        plist.add (ARDOUR::Properties::start, 0);