Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 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);
 }