13
0

prevent limits on MAX_DBL from messing up combination of a framepos_t and a speed. probably needs a change to max_framepos as a better solution

git-svn-id: svn://localhost/ardour2/branches/3.0@9172 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-03-21 15:08:33 +00:00
parent 7874dd2b07
commit 02ed0b0527

View File

@ -619,13 +619,13 @@ std::ostream& operator<<(std::ostream& o, const ARDOUR::PositionLockStyle& sf);
static inline ARDOUR::framepos_t
session_frame_to_track_frame (ARDOUR::framepos_t session_frame, double speed)
{
return (ARDOUR::framepos_t)( (double)session_frame * speed );
return (ARDOUR::framepos_t) ((long double) session_frame * (long double) speed);
}
static inline ARDOUR::framepos_t
track_frame_to_session_frame (ARDOUR::framepos_t track_frame, double speed)
{
return (ARDOUR::framepos_t)( (double)track_frame / speed );
return (ARDOUR::framepos_t) ((long double) track_frame / (long double) speed);
}
/* for now, break the rules and use "using" to make this "global" */