2013-06-23
Lead:Some problems are very tangled. The first time I wrote software with sound, I had various problems!
Body: I found the method of using mediaplayer on the Internet and used it in the program. I found that there was always a problem and an error was reported during setdatasource. The error code is as follows:
06-23 18:07:41.455: E/MediaPlayer(16244): Unable to to create media player06-23 18:07:41.460: W/System.err(16244): java.io.IOException: setDataSourceFD failed.: status=0x8000000006-23 18:07:41.465: W/System.err(16244): at android.media.MediaPlayer.setDataSource(Native Method)06-23 18:07:41.465: W/System.err(16244): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1186)06-23 18:07:41.465: W/System.err(16244): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1157)06-23 18:07:41.465: W/System.err(16244): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1103)06-23 18:07:41.465: W/System.err(16244): at akai.android.seavoice.MainActivity$1$1.run(MainActivity.java:270)
In fact, there is no problem with the Code. My audio is downloaded from the Internet, and there are some problems in the download process, which leads to incorrect audio files.
Solution: Use File Management to open your audio file and check whether it can be opened. If this problem occurs, it is a file problem, not a code problem.
Above!