diff options
Diffstat (limited to 'msd/src/msd.h')
-rw-r--r-- | msd/src/msd.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/msd/src/msd.h b/msd/src/msd.h index baebba3..27c1c66 100644 --- a/msd/src/msd.h +++ b/msd/src/msd.h @@ -268,10 +268,10 @@ public: } inline t_float interp_buf(t_float indexf, flext::buffer *buf, t_float factor) { - t_int size_buf=buf->Frames(); + t_float size_buf=buf->Frames(); t_float index_factor = indexf*(size_buf-1)/factor; if (index_factor > size_buf - 1) - return buf->Data()[(int)floor(index_factor)]; + return buf->Data()[(int)size_buf - 1]; else if (index_factor < 0) return buf->Data()[0]; else { |