src/plugins/rayo/src/java/com/sun/voip/LowPassFilter.java
/*
     * Low pass filter using moving average
     */
Low pass filter using moving average
Low pass filter using moving average
public byte[] lpf(byte[] inSamples) {
	int length = inSamples.length & ~1;	
	int[] ints = new int[length / 2];
	AudioConversion.bytesToInts(inSamples, 0, length, ints);
	ints = lpf(ints);
	byte[] bytes = new byte[ints.length * 2];
	AudioConversion.intsToBytes(ints, bytes, 0);
	return bytes;
    }
public byte [ ] lpf ( byte [ ] inSamples ) { int length = inSamples . length & ~ 1 ; int [ ] ints = new int [ length / 2 ] ; AudioConversion . bytesToInts ( inSamples , 0 , length , ints ) ; ints = lpf ( ints ) ; byte [ ] bytes = new byte [ ints . length * 2 ] ; AudioConversion . intsToBytes ( ints , bytes , 0 ) ; return bytes ; }
Low pass filter using moving average
Low pass filter using moving average
// round down