|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object DiffSound
public class DiffSound
A class that encodes a Sound using an array of differences between sound samples. It is lossless only if every difference is in the range [-128..127].
Constructor Summary | |
---|---|
DiffSound(int sample,
byte[] diffs)
Initialize the DiffSound using a given first sample and array of differences between adjacent samples. |
Method Summary | |
---|---|
Sound |
decompress()
Deompresses the receiver as a Sound, reconstructing the array of samples from its array of _differences_ between samples. |
void |
displayDifferences(int start,
int end)
Display to standard output the difference values between locations start and end, inclusive. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DiffSound(int sample, byte[] diffs)
sample
- the first sample in the sound [-32768..32767]diffs
- an array of differences between samplesMethod Detail |
---|
public void displayDifferences(int start, int end)
start
- the location of the first value to displayend
- the location of the last value to displaypublic Sound decompress()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |