From d8e675b0fcfa8a8b8f1bd3561172607c30f48574 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Sat, 29 Mar 2003 03:36:07 +0000 Subject: "" svn path=/trunk/; revision=507 --- externals/grill/flext/source/flbuf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'externals/grill/flext/source/flbuf.cpp') diff --git a/externals/grill/flext/source/flbuf.cpp b/externals/grill/flext/source/flbuf.cpp index 6c6edb2e..5d004e4d 100644 --- a/externals/grill/flext/source/flbuf.cpp +++ b/externals/grill/flext/source/flbuf.cpp @@ -199,8 +199,8 @@ void flext::buffer::Frames(int fr,bool keep,bool zero) t_atom msg; _buffer *buf = (_buffer *)sym->s_thing; // b_msr reflects buffer sample rate... is this what we want? - // Max bug: adding small value 0.001 to get right sample count - float ms = fr/buf->b_msr+0.001; + // Max bug: adding half a sample to prevent roundoff errors.... + float ms = (fr+0.5)/buf->b_msr; SetFloat(msg,ms); ::typedmess((object *)buf,gensym("size"),1,&msg); -- cgit v1.2.1