lava.riff.wave
Class WaveSampleConverter
java.lang.Object
|
+--lava.riff.wave.WaveSampleConverter
- public abstract class WaveSampleConverter
- extends java.lang.Object
Casts samples from one type to another.
Details: WaveSampleConverted
casts arrays of samples from one type to another.
The functions in this class have the following general signature:
DEST_TYPE[] toDEST_TYPE (SRC_TYPE[] src, int from, DEST_TYPE[] dest, int to, int amt)
where
- SRC_TYPE
- is the primitive type of the source array (byte, short, int, float, etc.)
- src
- is the source array
- from
- is the starting index in the source array
- DEST_TYPE
- is the primitive type of the destination array (byte, short, int, float, etc.)
- dest
- is the destination array
- to
- is the starting index in the destination array
- amt
- is the number of elements from the source array to convert
- the return value
- is dest, returned for convenience, or a new array, if dest is null
If src is null
, no action is taken and null
is returned. If dest is null
, a new array is created whose length is just long enough to accomodate the requested operation, and that new array is returned.
- Since:
- 1998.05.27
- Version:
- 1999.09.11
Method Summary |
static byte[] |
toBytes(double[] src,
int from,
byte[] dest,
int to,
int amt)
|
static byte[] |
toBytes(float[] src,
int from,
byte[] dest,
int to,
int amt)
|
static byte[] |
toBytes(int[] src,
int from,
byte[] dest,
int to,
int amt)
|
static byte[] |
toBytes(long[] src,
int from,
byte[] dest,
int to,
int amt)
|
static byte[] |
toBytes(short[] src,
int from,
byte[] dest,
int to,
int amt)
|
static double[] |
toDoubles(byte[] src,
int from,
double[] dest,
int to,
int amt)
|
static double[] |
toDoubles(float[] src,
int from,
double[] dest,
int to,
int amt)
|
static double[] |
toDoubles(int[] src,
int from,
double[] dest,
int to,
int amt)
|
static double[] |
toDoubles(long[] src,
int from,
double[] dest,
int to,
int amt)
|
static double[] |
toDoubles(short[] src,
int from,
double[] dest,
int to,
int amt)
|
static float[] |
toFloats(byte[] src,
int from,
float[] dest,
int to,
int amt)
|
static float[] |
toFloats(double[] src,
int from,
float[] dest,
int to,
int amt)
|
static float[] |
toFloats(int[] src,
int from,
float[] dest,
int to,
int amt)
|
static float[] |
toFloats(long[] src,
int from,
float[] dest,
int to,
int amt)
|
static float[] |
toFloats(short[] src,
int from,
float[] dest,
int to,
int amt)
|
static int[] |
toInts(byte[] src,
int from,
int[] dest,
int to,
int amt)
|
static int[] |
toInts(double[] src,
int from,
int[] dest,
int to,
int amt)
|
static int[] |
toInts(float[] src,
int from,
int[] dest,
int to,
int amt)
|
static int[] |
toInts(long[] src,
int from,
int[] dest,
int to,
int amt)
|
static int[] |
toInts(short[] src,
int from,
int[] dest,
int to,
int amt)
|
static long[] |
toLongs(byte[] src,
int from,
long[] dest,
int to,
int amt)
|
static long[] |
toLongs(double[] src,
int from,
long[] dest,
int to,
int amt)
|
static long[] |
toLongs(float[] src,
int from,
long[] dest,
int to,
int amt)
|
static long[] |
toLongs(int[] src,
int from,
long[] dest,
int to,
int amt)
|
static long[] |
toLongs(short[] src,
int from,
long[] dest,
int to,
int amt)
|
static short[] |
toShorts(byte[] src,
int from,
short[] dest,
int to,
int amt)
|
static short[] |
toShorts(double[] src,
int from,
short[] dest,
int to,
int amt)
|
static short[] |
toShorts(float[] src,
int from,
short[] dest,
int to,
int amt)
|
static short[] |
toShorts(int[] src,
int from,
short[] dest,
int to,
int amt)
|
static short[] |
toShorts(long[] src,
int from,
short[] dest,
int to,
int amt)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
WaveSampleConverter
public WaveSampleConverter()
toDoubles
public static final double[] toDoubles(float[] src,
int from,
double[] dest,
int to,
int amt)
toDoubles
public static double[] toDoubles(long[] src,
int from,
double[] dest,
int to,
int amt)
toDoubles
public static double[] toDoubles(int[] src,
int from,
double[] dest,
int to,
int amt)
toDoubles
public static double[] toDoubles(short[] src,
int from,
double[] dest,
int to,
int amt)
toDoubles
public static double[] toDoubles(byte[] src,
int from,
double[] dest,
int to,
int amt)
toFloats
public static final float[] toFloats(double[] src,
int from,
float[] dest,
int to,
int amt)
toFloats
public static float[] toFloats(long[] src,
int from,
float[] dest,
int to,
int amt)
toFloats
public static float[] toFloats(int[] src,
int from,
float[] dest,
int to,
int amt)
toFloats
public static float[] toFloats(short[] src,
int from,
float[] dest,
int to,
int amt)
toFloats
public static float[] toFloats(byte[] src,
int from,
float[] dest,
int to,
int amt)
toLongs
public static long[] toLongs(double[] src,
int from,
long[] dest,
int to,
int amt)
toLongs
public static long[] toLongs(float[] src,
int from,
long[] dest,
int to,
int amt)
toLongs
public static long[] toLongs(int[] src,
int from,
long[] dest,
int to,
int amt)
toLongs
public static long[] toLongs(short[] src,
int from,
long[] dest,
int to,
int amt)
toLongs
public static long[] toLongs(byte[] src,
int from,
long[] dest,
int to,
int amt)
toInts
public static int[] toInts(double[] src,
int from,
int[] dest,
int to,
int amt)
toInts
public static int[] toInts(float[] src,
int from,
int[] dest,
int to,
int amt)
toInts
public static final int[] toInts(long[] src,
int from,
int[] dest,
int to,
int amt)
toInts
public static int[] toInts(short[] src,
int from,
int[] dest,
int to,
int amt)
toInts
public static int[] toInts(byte[] src,
int from,
int[] dest,
int to,
int amt)
toShorts
public static short[] toShorts(double[] src,
int from,
short[] dest,
int to,
int amt)
toShorts
public static short[] toShorts(float[] src,
int from,
short[] dest,
int to,
int amt)
toShorts
public static final short[] toShorts(long[] src,
int from,
short[] dest,
int to,
int amt)
toShorts
public static final short[] toShorts(int[] src,
int from,
short[] dest,
int to,
int amt)
toShorts
public static short[] toShorts(byte[] src,
int from,
short[] dest,
int to,
int amt)
toBytes
public static byte[] toBytes(double[] src,
int from,
byte[] dest,
int to,
int amt)
toBytes
public static byte[] toBytes(float[] src,
int from,
byte[] dest,
int to,
int amt)
toBytes
public static byte[] toBytes(long[] src,
int from,
byte[] dest,
int to,
int amt)
toBytes
public static final byte[] toBytes(int[] src,
int from,
byte[] dest,
int to,
int amt)
toBytes
public static final byte[] toBytes(short[] src,
int from,
byte[] dest,
int to,
int amt)