如何在Android中播放MID文件?

时间:2010-11-12 15:49:59

标签: android midi

我正在写一小段代码

MediaPlayer mediaPlayer = new MediaPlayer();
mediaPlayer.setDataSource("http://..../file.mid");
mediaPlayer.prepare();
mediaPlayer.start();

无效,

MediaPlayer mediaPlayer = new MediaPlayer();
mediaPlayer.setDataSource("http://..../file.mp3");
mediaPlayer.prepare();
mediaPlayer.start();

工作正常。

1 个答案:

答案 0 :(得分:0)

请在实用论坛上查看此主题: Java SE5 javax.sound (MIDI) classes removed from Android libraries?

您最好的选择似乎是通过JetPlayer class