edu.cmu.sphinx.frontend
Class FloatData

java.lang.Object
  extended byedu.cmu.sphinx.frontend.FloatData
All Implemented Interfaces:
java.lang.Cloneable, Data

public class FloatData
extends java.lang.Object
implements Data, java.lang.Cloneable

A Data object that holds data of primitive type float.

See Also:
Data

Constructor Summary
FloatData(float[] values, int sampleRate, long collectTime, long firstSampleNumber)
          Constructs a Data object with the given values, sample rate, collect time, and first sample number.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this Data object.
 long getCollectTime()
          Returns the time in milliseconds at which the audio data is collected.
 long getFirstSampleNumber()
          Returns the position of the first sample in the original data.
 int getSampleRate()
          Returns the sample rate of this data.
 float[] getValues()
          Returns the values of this DoubleData object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FloatData

public FloatData(float[] values,
                 int sampleRate,
                 long collectTime,
                 long firstSampleNumber)
Constructs a Data object with the given values, sample rate, collect time, and first sample number.

Parameters:
values - the data values
sampleRate - the sample rate of the data
collectTime - the time at which this data is collected
firstSampleNumber - the position of the first sample in the original data
Method Detail

getValues

public float[] getValues()
Returns the values of this DoubleData object.

Returns:
the values

getSampleRate

public int getSampleRate()
Returns the sample rate of this data.

Returns:
the sample rate of this data

getFirstSampleNumber

public long getFirstSampleNumber()
Returns the position of the first sample in the original data. The very first sample number is zero.

Returns:
the position of the first sample in the original data

getCollectTime

public long getCollectTime()
Returns the time in milliseconds at which the audio data is collected.

Returns:
the difference, in milliseconds, between the time the audio data is collected and midnight, January 1, 1970

clone

public java.lang.Object clone()
Returns a clone of this Data object.

Returns:
a clone of this data object