summaryrefslogtreecommitdiff
path: root/gtk2_ardour/video_timeline.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2013-08-04 18:49:28 +0200
committerPaul Davis <paul@linuxaudiosystems.com>2013-08-08 15:26:41 -0400
commitbadb902bc0c2f58bda5f73d910a5ee0ccdc0221d (patch)
tree756488284d7b0f67a9f0773901df2018ec5a7042 /gtk2_ardour/video_timeline.h
parent4c60dd983c7d7145f3babe0f27c9bf846cb6d761 (diff)
fix rounding issue when dragging video with fractional fps
Diffstat (limited to 'gtk2_ardour/video_timeline.h')
-rw-r--r--gtk2_ardour/video_timeline.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk2_ardour/video_timeline.h b/gtk2_ardour/video_timeline.h
index ee682fa05e..dd61d2ef73 100644
--- a/gtk2_ardour/video_timeline.h
+++ b/gtk2_ardour/video_timeline.h
@@ -96,7 +96,7 @@ class VideoTimeLine : public sigc::trackable, public ARDOUR::SessionHandlePtr, p
float get_apv(); /* audio samples per video frame; */
ARDOUR::framecnt_t get_duration () { return video_duration;}
ARDOUR::frameoffset_t get_offset () { return video_offset;}
- ARDOUR::frameoffset_t quantify_frames_to_apv (ARDOUR::frameoffset_t offset) { return floor(offset/get_apv())*get_apv(); }
+ ARDOUR::frameoffset_t quantify_frames_to_apv (ARDOUR::frameoffset_t offset) { return rint(offset/get_apv())*get_apv(); }
void set_offset (ARDOUR::frameoffset_t offset) { video_offset = quantify_frames_to_apv(offset); } // this function does not update video_offset_p, call save_undo() to finalize changes to this! - this fn is currently only used from editor_drag.cc
protected: