File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Android and the fly likes Using AudioInputStream in Android Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Using AudioInputStream in Android" Watch "Using AudioInputStream in Android" New topic

Using AudioInputStream in Android

Ayden Kim

Joined: Feb 10, 2011
Posts: 5
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();
I agree. Here's the link:
subject: Using AudioInputStream in Android
It's not a secret anymore!