javaclient
Class WaveformInterface

java.lang.Object
  extended by javaclient.PlayerDevice
      extended by javaclient.WaveformInterface

public class WaveformInterface
extends PlayerDevice

The waveform interface is used to receive arbitrary digital samples, say from a digital audio device.

Version:
Author:
Radu Bogdan Rusu

Field Summary
static short PLAYER_WAVEFORM_DATA_MAX
          4K - half the packet max
 
Fields inherited from class javaclient.PlayerDevice
device, DIFFERENCE_SYNCH_FACTOR, index, is, os, pc, PLAYER_MAX_REQREP_SIZE, PLAYER_STXX, reserved, size, t_sec, t_usec, ts_sec, ts_usec
 
Constructor Summary
WaveformInterface(PlayerClient pc, short indexOfDevice)
          Constructor for WaveformInterface.
 
Method Summary
 byte[] getData()
          Returns the data array
 int getDepth()
          Returns the current depth in bits per sample.
 int getRate()
          Returns the current bit rate in bits per second.
 int getSamples()
          Returns the number of samples.
 void readData()
          The waveform interface reads a digitized waveform from the target device.
 
Methods inherited from class javaclient.PlayerDevice
getTimeForDataSampled_sec, getTimeForDataSampled_usec, getTimeForDataSampled, getTimeForDataSent_sec, getTimeForDataSent_usec, getTimeForDataSent, handleEARMessage, handleNARMessage, handleResponse, readHeader, sendHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLAYER_WAVEFORM_DATA_MAX

public static final short PLAYER_WAVEFORM_DATA_MAX
4K - half the packet max

See Also:
Constant Field Values
Constructor Detail

WaveformInterface

public WaveformInterface(PlayerClient pc,
                         short indexOfDevice)
Constructor for WaveformInterface.

Parameters:
pc - a reference to the PlayerClient object
indexOfDevice - the index of the device
Method Detail

readData

public void readData()
The waveform interface reads a digitized waveform from the target device.

Overrides:
readData in class PlayerDevice

getRate

public int getRate()
Returns the current bit rate in bits per second.

Returns:
the current bit rate as an integer

getDepth

public int getDepth()
Returns the current depth in bits per sample.

Returns:
the current depth as an integer

getSamples

public int getSamples()
Returns the number of samples.

Returns:
the number of bytes of raw data to follow as an integer

getData

public byte[] getData()
Returns the data array

Returns:
the array of raw data as an array of bytes