prevent subveclen to wrap at 2^31
fixes http://pastebin.com/X629ZE7F (Timecode 22h @48k, 512fpp) git-svn-id: svn://localhost/ardour2/branches/3.0@13528 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
7b57d47e25
commit
ba7f951919
|
@ -224,7 +224,7 @@ Curve::_get_vector (double x0, double x1, float *vec, int32_t veclen)
|
|||
*/
|
||||
|
||||
double frac = (min_x - x0) / (x1 - x0);
|
||||
int32_t subveclen = (int32_t) floor (veclen * frac);
|
||||
int64_t subveclen = (int64_t) floor (veclen * frac);
|
||||
|
||||
subveclen = min (subveclen, veclen);
|
||||
|
||||
|
@ -242,7 +242,7 @@ Curve::_get_vector (double x0, double x1, float *vec, int32_t veclen)
|
|||
|
||||
double frac = (x1 - max_x) / (x1 - x0);
|
||||
|
||||
int32_t subveclen = (int32_t) floor (original_veclen * frac);
|
||||
int64_t subveclen = (int64_t) floor (original_veclen * frac);
|
||||
|
||||
float val;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user