[Clam-devel] AudioFileMemoryLoader patch

Pau Arumí parumi at iua.upf.edu
Fri Jun 20 09:33:55 PDT 2008


On dv, 2008-06-20 at 18:14 +0200, Pawel Bartkiewicz wrote:
> On 18/06/2008, David García Garzón <dgarcia at iua.upf.edu> wrote:
> > Sorry, i sent the comments about the patch but i forgot to commit it #11523
> >
> > Anyway, you should not wait for my commits to send more patches.
> 
> Well, I thought that there's something wrong with the previous patch
> so I wasn't sure if sending another one is a good idea. Anyway, I
> passed the Physics exam yesterday so I won't have any more exams until
> September :)
> 
> I'm not sure if the delta is necessary, because there are no floating
> point operations -- only a simple check if the value has changed -- so
> I have prepared two patches: one with simple value comparison and the
> other one with delta. Both work fine.


+         if (currentPosition != _lastPosition) {

the problem lies in the fact that in C and C++ the equality of floating
points variables is not guaranteed, because they "approximate" the real
results, and the float representation of the approximations might be
different.
using delta is safer.

P





More information about the clam-devel mailing list