Hi. I'm trying to porting a
java project to Android.
But I found that Android does not support javax.sound.
Does anyone know the way to use AudioInputStream in Android?
Thank you.
-- Java code --
private AudioInputStream audioInputStream; -- Android does not have AudioInputStream class
private int[][] samplesContainer;
private AudioFormat audioFormat; -- Android has AudioFormat class, but I don't know it is exactly same as Java
//cached values
protected int sampleMax = 0;
protected int sampleMin = 0;
protected double biggestSample;
public AudioInfo(AudioInputStream aiStream) {
this.audioInputStream = aiStream;
this.audioFormat = audioInputStream.getFormat();
createSampleArrayCollection();
}