edu.cmu.sphinx.tools.audio
Class Downsampler

java.lang.Object
  extended byedu.cmu.sphinx.tools.audio.Downsampler

public class Downsampler
extends java.lang.Object

Downsamples an audio clip.


Constructor Summary
Downsampler()
           
 
Method Summary
static short[] downsample(short[] inSamples, int srIn, int srOut)
          Downsamples the given audio clip from the given input sample rate to the given output sample rate.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Downsampler

public Downsampler()
Method Detail

downsample

public static short[] downsample(short[] inSamples,
                                 int srIn,
                                 int srOut)
Downsamples the given audio clip from the given input sample rate to the given output sample rate.

Parameters:
inSamples - the clip to down sample - one sample per element
srIn - the sample rate of the given clip
srOut - the sample to downsample to
Returns:
an array of downsampled samples