edu.cmu.sphinx.frontend
Class GainControlProcessor

java.lang.Object
  extended by edu.cmu.sphinx.frontend.BaseDataProcessor
      extended by edu.cmu.sphinx.frontend.GainControlProcessor
All Implemented Interfaces:
DataProcessor, Configurable

public class GainControlProcessor
extends BaseDataProcessor

Allows to modify the gain of an audio-signal. If the gainFactor is 1 the signal passes this DataProcessor unchanged.

Author:
Holger Brandl

Field Summary
static java.lang.String GAIN_FACTOR
           
 
Constructor Summary
GainControlProcessor()
           
 
Method Summary
 Data getData()
          Returns the processed Data output.
 double getGainFactor()
           
 void newProperties(PropertySheet ps)
          This method is called when this configurable component needs to be reconfigured.
 void setGainFactor(double gainFactor)
           
 
Methods inherited from class edu.cmu.sphinx.frontend.BaseDataProcessor
getPredecessor, getTimer, initialize, setPredecessor, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GAIN_FACTOR

@S4Double(defaultValue=1.0)
public static final java.lang.String GAIN_FACTOR
See Also:
Constant Field Values
Constructor Detail

GainControlProcessor

public GainControlProcessor()
Method Detail

newProperties

public void newProperties(PropertySheet ps)
                   throws PropertyException
Description copied from interface: Configurable
This method is called when this configurable component needs to be reconfigured.

Specified by:
newProperties in interface Configurable
Overrides:
newProperties in class BaseDataProcessor
Parameters:
ps - a property sheet holding the new data
Throws:
PropertyException - if there is a problem with the properties.

getData

public Data getData()
             throws DataProcessingException
Description copied from class: BaseDataProcessor
Returns the processed Data output.

Specified by:
getData in interface DataProcessor
Specified by:
getData in class BaseDataProcessor
Returns:
an Data object that has been processed by this DataProcessor
Throws:
DataProcessingException - if a data processor error occurs

getGainFactor

public double getGainFactor()

setGainFactor

public void setGainFactor(double gainFactor)