Tempo ramps - avoid sending negative beats to the BFC.
[ardour.git] / libs / timecode / timecode / time.h
index ad7af28037de4f4bdcc232d11b246b00adb0368a..100b5d30d8285bb0b84999a2cb8dfa29257f9f6f 100644 (file)
@@ -1,16 +1,16 @@
 /*
        Copyright (C) 2006-2010 Paul Davis
-       
+
        This program is free software; you can redistribute it and/or modify it
        under the terms of the GNU Lesser General Public License as published
        by the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.
-       
+
        This program is distributed in the hope that it will be useful, but WITHOUT
        ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
        FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
        for more details.
-       
+
        You should have received a copy of the GNU General Public License along
        with this program; if not, write to the Free Software Foundation, Inc.,
        675 Mass Ave, Cambridge, MA 02139, USA.
@@ -69,9 +69,9 @@ struct LIBTIMECODE_API Time {
                frames = 0;
                subframes = 0;
                rate = a_rate;
-               drop = (rintf(100.f * a_rate) == 2997);
+               drop = (lrintf(100.f * (float)a_rate) == (long)2997);
        }
-       
+
        bool operator== (const Time& other) const {
                return negative == other.negative && hours == other.hours &&
                       minutes == other.minutes && seconds == other.seconds &&