|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groovemanager.sampled.waveform.AbstractWaveForm
com.groovemanager.sampled.waveform.ByteArrayWaveForm
A ByteArrayWaveForm reads its displayable data directly from a given array of audio data. This can be very memory consuming so that ByteArrayWaveForms should only be used for small amounts of audio data. This implementation will only read the most signifigant byte of each sample. For AudioFormats where this byte doesn´t represent more or less the real amplitude, this implementation should not be used.
| Field Summary | |
|---|---|
protected byte[] |
data
The audio data |
protected javax.sound.sampled.AudioFormat |
format
The format of the audio data |
protected int |
fSize
The frame size of the audio format |
protected int |
sSize
The frame size of the audio format |
| Fields inherited from class com.groovemanager.sampled.waveform.AbstractWaveForm |
|---|
channels, displayWidth, intervallSize, nullWave, position, realLength |
| Constructor Summary | |
|---|---|
ByteArrayWaveForm(byte[] data,
javax.sound.sampled.AudioFormat format)
Construct a new ByteArrayWaveForm |
|
| Method Summary | |
|---|---|
byte |
getMax(int channel)
Get the maximum value at the current read position in the given channel |
byte |
getMin(int channel)
Get the minimum value at the current read position in the given channel |
| Methods inherited from class com.groovemanager.sampled.waveform.AbstractWaveForm |
|---|
canProvide, getAdditionalToString, getChannels, getData, getDisplayableLength, getIntervallSize, getPosition, getRealLength, getRealPosition, getZoomFactor, next, rewind, setPosition, setRealPosition, subWaveForm, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected byte[] data
protected javax.sound.sampled.AudioFormat format
protected int fSize
protected int sSize
| Constructor Detail |
|---|
public ByteArrayWaveForm(byte[] data,
javax.sound.sampled.AudioFormat format)
data - The audio data to displayformat - The format of the given audio data| Method Detail |
|---|
public byte getMax(int channel)
WaveForm
channel - the zero-based index of the channel
public byte getMin(int channel)
WaveForm
channel - the zero-based index of the channel
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||