summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-03-21 15:08:33 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-03-21 15:08:33 +0000
commit02ed0b0527859474acfb9ee019a0107100b634bc (patch)
treec54976d7ebe9dca150b07f7d3332f23c590dab57 /libs
parent7874dd2b07ec38a400479e39a65e4d4c75b32394 (diff)
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
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/types.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h
index d831dfae2b..6cce6bb64f 100644
--- a/libs/ardour/ardour/types.h
+++ b/libs/ardour/ardour/types.h
@@ -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" */