This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mattmalec.resample; | |
public class Resample { | |
public static byte[] resample(byte[] data, int length, boolean stereo, int inFrequency, int outFrequency) { | |
if (inFrequency < outFrequency) | |
return upsample(data, length, stereo, inFrequency, outFrequency); | |
if (inFrequency > outFrequency) | |
return downsample(data, length, stereo, inFrequency, outFrequency); |