com.sun.media.sound
Class SoftSincResampler

java.lang.Object
  extended by com.sun.media.sound.SoftAbstractResampler
      extended by com.sun.media.sound.SoftSincResampler
All Implemented Interfaces:
SoftResampler

public class SoftSincResampler
extends SoftAbstractResampler

Hann windowed sinc interpolation resampler with anti-alias filtering. Using 30 points for the interpolation.

Author:
Karl Helgason

Constructor Summary
SoftSincResampler()
           
 
Method Summary
 int getPadding()
           
 void interpolate(float[] in, float[] in_offset, float in_end, float[] startpitch, float pitchstep, float[] out, int[] out_offset, int out_end)
           
static double sinc(double x)
           
static float[] sincTable(int size, float offset, float scale)
           
static float[] wHanning(int size, float offset)
           
 
Methods inherited from class com.sun.media.sound.SoftAbstractResampler
openStreamer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoftSincResampler

public SoftSincResampler()
Method Detail

sinc

public static double sinc(double x)

wHanning

public static float[] wHanning(int size,
                               float offset)

sincTable

public static float[] sincTable(int size,
                                float offset,
                                float scale)

getPadding

public int getPadding()
Specified by:
getPadding in class SoftAbstractResampler

interpolate

public void interpolate(float[] in,
                        float[] in_offset,
                        float in_end,
                        float[] startpitch,
                        float pitchstep,
                        float[] out,
                        int[] out_offset,
                        int out_end)
Specified by:
interpolate in class SoftAbstractResampler