这是我的代码:mp3格式文件播放没有任何错误,但是wav格式带来了MediaPlayer错误(1,-1):
try {
MediaPlayer player = new MediaPlayer();
player.setAudioStreamType(AudioManager.STREAM_MUSIC);
player.setDataSource("h*.wav");
player.prepare();
player.start();} catch (Exception e) {
// TODO: handle exception
}