如何在Android中播放MID文件?
我正在编写一小段
MediaPlayer mediaPlayer = new MediaPlayer();
mediaPlayer.setDataSource("http://..../file.mid");
mediaPlayer.prepare();
mediaPlayer.start();
无法正常工作的代码,而 as
MediaPlayer mediaPlayer = new MediaPlayer();
mediaPlayer.setDataSource("http://..../file.mp3");
mediaPlayer.prepare();
mediaPlayer.start();
则工作正常。
I am writing a small piece of code
MediaPlayer mediaPlayer = new MediaPlayer();
mediaPlayer.setDataSource("http://..../file.mid");
mediaPlayer.prepare();
mediaPlayer.start();
which is not working, where as
MediaPlayer mediaPlayer = new MediaPlayer();
mediaPlayer.setDataSource("http://..../file.mp3");
mediaPlayer.prepare();
mediaPlayer.start();
is working fine.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅实用论坛上的此主题:
Java SE5 javax.sound (MIDI) 类已从 Android 库中删除?
您的最佳选择似乎是通过 JetPlayer 类
Please see this thread on the Pragmatic Forums:
Java SE5 javax.sound (MIDI) classes removed from Android libraries?
Your best option appears to be through the JetPlayer class