public AudioSample getAudioSample( float[] left, float[] right, AudioFormat format, int bufferSize) { FloatSampleBuffer sample = new FloatSampleBuffer(2, left.length, format.getSampleRate()); System.arraycopy(left, 0, sample.getChannel(0), 0, left.length); System.arraycopy(right, 0, sample.getChannel(1), 0, right.length); return getAudioSampleImp(sample, format, bufferSize); }
public AudioSample getAudioSample(float[] samples, AudioFormat format, int bufferSize) { FloatSampleBuffer sample = new FloatSampleBuffer(1, samples.length, format.getSampleRate()); System.arraycopy(samples, 0, sample.getChannel(0), 0, samples.length); return getAudioSampleImp(sample, format, bufferSize); }