tapeutils
Interface WaveIdentifier

All Known Implementing Classes:
SineWaveIdentifier

public interface WaveIdentifier

This interface provides operations to identify waves in samples.

Author:
hldswrth

Method Summary
 void cleanUp()
          Clean up the state of the wave identifier.
 void completeProcessing()
          Complete processing of the last wave, if necessary.
 int getActualMaxWaveLength()
          Get the actual maximum wave width.
 int getActualMinWaveLength()
          Get the actual minimum wave width.
 int getAverageWaveLength()
          Get the actual average wave width.
 int getFitValue(int index)
          Get the fit value at the given position in the sample.
 int getNoiseThreshold()
          Get the noise threshold.
 int getWaveValue(int index)
          Get the wave value at the given position in the sample.
 int identifyNextWave(int pos, int sampleValue)
          Identify the next wave in the sample.
 void initialize()
          Initialize this object ready for processing a sample.
 boolean processingDropOut()
          Return an indicator of whether we are currently processing a drop out of the signal.
 void startProcessingDropOut(int restoreIndex)
          Start processing a drop-out in the signal.
 

Method Detail

initialize

public void initialize()
Initialize this object ready for processing a sample.


identifyNextWave

public int identifyNextWave(int pos,
                            int sampleValue)
Identify the next wave in the sample.

Parameters:
pos - The current position in the sample.
sampleValue - The current sample value.
Returns:
The position in the sample at which processing should continue.

completeProcessing

public void completeProcessing()
Complete processing of the last wave, if necessary.


processingDropOut

public boolean processingDropOut()
Return an indicator of whether we are currently processing a drop out of the signal.

Returns:
Indicates whether we are processing a drop-out.

startProcessingDropOut

public void startProcessingDropOut(int restoreIndex)
Start processing a drop-out in the signal.

Parameters:
restoreIndex - The index of the sample to restore normal processing.

getActualMinWaveLength

public int getActualMinWaveLength()
Get the actual minimum wave width.

Returns:
The actual minimum wave width.

getActualMaxWaveLength

public int getActualMaxWaveLength()
Get the actual maximum wave width.

Returns:
The actual maximum wave width.

getAverageWaveLength

public int getAverageWaveLength()
Get the actual average wave width.

Returns:
The actual average wave width.

getNoiseThreshold

public int getNoiseThreshold()
Get the noise threshold.

Returns:
The noise threshold.

getWaveValue

public int getWaveValue(int index)
Get the wave value at the given position in the sample.

Parameters:
index - The index of the sample.
Returns:
The wave value.

getFitValue

public int getFitValue(int index)
Get the fit value at the given position in the sample.

Parameters:
index - The index of the sample.
Returns:
The fit value.

cleanUp

public void cleanUp()
Clean up the state of the wave identifier.