|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.org.toot.audio.core.FloatDenormals
public class FloatDenormals
Provides ways to deal with FPU denormals, which, if left in audio data tend to cause exceptionally high CPU uage. Floating point denormals typically occur when a feedback network causes an exponential decay. Eventually the value becomes so small it cannot be represented efficiently by the FPU.
Field Summary | |
---|---|
static float |
THRESHOLD
|
Constructor Summary | |
---|---|
FloatDenormals()
|
Method Summary | |
---|---|
static int |
countDenorms(float[] array,
int len)
Count denormal floats in an array. |
static boolean |
isDenormal(float x)
Detect a denormal float (excluding zero). |
static boolean |
isDenormalOrZero(float x)
Detect a denormal (or zero) float. |
static float |
zeroDenorm(float x)
Replace a denormal float with zero. |
static void |
zeroDenorms(float[] array,
int len)
Replace denormal floats in an array with zeros. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final float THRESHOLD
Constructor Detail |
---|
public FloatDenormals()
Method Detail |
---|
public static boolean isDenormal(float x)
public static boolean isDenormalOrZero(float x)
public static float zeroDenorm(float x)
public static void zeroDenorms(float[] array, int len)
public static int countDenorms(float[] array, int len)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |