Re: [ecasound] looping samples

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] looping samples
From: Kai Vehmanen (kai.vehmanen_AT_wakkanet.fi)
Date: Wed May 08 2002 - 19:14:40 EEST


Hi,

On Tue, 7 May 2002, OXullo Intersecans wrote:

> double curpos = e.last_float();
> if (curpos==lengths[i]) e.command("ai-setpos 0");

as a rule of thumb you should avoid comparing float values with equality
operator (==). Instead it's better to use either < or >. In this case for
example...

if (curpos >= lengths[i]) e.command("ai-setpos 0");

... should work more reliably.

-- 
 http://www.eca.cx
 Audio software for Linux!

-- To unsubscribe send message 'unsubscribe' in the body of the message to <ecasound-list-request_AT_wakkanet.fi>.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed May 08 2002 - 18:59:44 EEST