I'm from Ecuador
I'm building a java application for raspberry pi and wolfson audio card; when I run the java program uses sound audio output raspberry pi and not the wolfson audio output as I need; however when I use the command aplay for example wolfson audio card working properly
This is the code
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import javazoom.jl.decoder.JavaLayerException;
import javazoom.jl.player.Player;
public class YACPlayMP3 {
/**
* @param args
*/
public static void main(String[] args) {
try {
FileInputStream fis;
Player player;
fis = new FileInputStream("./mezzo.mp3");
BufferedInputStream bis = new BufferedInputStream(fis);
player = new Player(bis); // Llamada a constructor de la clase
// Player
player.play(); // Llamada al metodo play
} catch (JavaLayerException e) {
e.printStackTrace();
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
}