com.jsyn.data
Class ShortSample
java.lang.Object
com.jsyn.data.SequentialDataCommon
com.jsyn.data.AudioSample
com.jsyn.data.ShortSample
- All Implemented Interfaces:
- SequentialData
public class ShortSample
- extends AudioSample
Store multi-channel short audio data in an interleaved buffer.
Method Summary |
void |
allocate(int numFrames,
int channelsPerFrame)
|
void |
read(int startFrame,
short[] data,
int startIndex,
int numFrames)
|
void |
read(short[] data)
|
double |
readDouble(int index)
Read a value at the given index. |
short |
readShort(int index)
|
void |
write(int startFrame,
short[] data,
int startIndex,
int numFrames)
|
void |
write(short[] data)
|
void |
writeDouble(int index,
double value)
Write a value at the given index. |
void |
writeShort(int index,
short value)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShortSample
public ShortSample()
ShortSample
public ShortSample(int numFrames,
int channelsPerFrame)
allocate
public void allocate(int numFrames,
int channelsPerFrame)
- Specified by:
allocate
in class AudioSample
write
public void write(int startFrame,
short[] data,
int startIndex,
int numFrames)
read
public void read(int startFrame,
short[] data,
int startIndex,
int numFrames)
write
public void write(short[] data)
read
public void read(short[] data)
readShort
public short readShort(int index)
writeShort
public void writeShort(int index,
short value)
readDouble
public double readDouble(int index)
- Description copied from interface:
SequentialData
- Read a value at the given index.
- Specified by:
readDouble
in interface SequentialData
- Specified by:
readDouble
in class SequentialDataCommon
writeDouble
public void writeDouble(int index,
double value)
- Description copied from interface:
SequentialData
- Write a value at the given index. Values are organized by frame.
So index = ((channelsPerFrame*frameIndex)+channelIndex)
- Specified by:
writeDouble
in interface SequentialData
- Specified by:
writeDouble
in class SequentialDataCommon