01-15 00:57:08.660: WARN/System.err(25286): java.io.IOException: setDataSourceFD failed.: status=0x80000000
01-15 00:57:08.660: WARN/System.err(25286): at android.media.MediaPlayer.setDataSource(Native Method)
01-15 00:57:08.660: WARN/System.err(25286): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:854)
...
...when trying to play local AMR audio file from application cache directory. It happens on HTC Magic, HTC Desire. AMR audio file is recorded by SonyEricsson xperia x10 mini and was downloaded from the Internet.
MediaPlayer is created in following way:
MediaPlayer player = new MediaPlayer();
player.setOnCompletionListener(this);
player.setOnErrorListener(this);
player.setAudioStreamType(AudioManager.STREAM_MUSIC);
try {
FileInputStream fis = new FileInputStream(filePath);
player.setDataSource(fis.getFD());
} catch (Exception e) {
...
}
Any ideas?