Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using AudioInputStream in Android

Ayden Kim
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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();
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic