Android MediaPlayer playing sound ok on virtual device and on tablet, but intermittently on smartphone galaxy s iii mini

161 views Asked by At

I'm using the following code in onCreate()

 mPlayer = MediaPlayer.create(this, R.raw.rain);
 mPlayer.start();

No problems in virtual emulator nor in tablet galaxy tab, but when I try on my Galaxy S 3 mini it plays the sound intermittently, my logcat looks like this:

06-11 12:48:04.253    5579-5579/? D/dalvikvm﹕ Late-enabling CheckJNI
06-11 12:48:04.573    5579-5579/cooervo.happysleeper I/dalvikvm﹕ Could not find method android.view.ViewGroup.onRtlPropertiesChanged, referenced from method android.support.v7.widget.Toolbar.onRtlPropertiesChanged
06-11 12:48:04.573    5579-5579/cooervo.happysleeper W/dalvikvm﹕ VFY: unable to resolve virtual method 13332: Landroid/view/ViewGroup;.onRtlPropertiesChanged (I)V
06-11 12:48:04.573    5579-5579/cooervo.happysleeper D/dalvikvm﹕ VFY: replacing opcode 0x6f at 0x0007
06-11 12:48:04.583    5579-5579/cooervo.happysleeper I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.internal.widget.TintTypedArray.getChangingConfigurations
06-11 12:48:04.583    5579-5579/cooervo.happysleeper W/dalvikvm﹕ VFY: unable to resolve virtual method 408: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
06-11 12:48:04.583    5579-5579/cooervo.happysleeper D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
06-11 12:48:04.593    5579-5579/cooervo.happysleeper I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.internal.widget.TintTypedArray.getType
06-11 12:48:04.593    5579-5579/cooervo.happysleeper W/dalvikvm﹕ VFY: unable to resolve virtual method 430: Landroid/content/res/TypedArray;.getType (I)I
06-11 12:48:04.593    5579-5579/cooervo.happysleeper D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
06-11 12:48:04.713    5579-5581/cooervo.happysleeper D/dalvikvm﹕ GC_CONCURRENT freed 194K, 12% free 9527K/10759K, paused 3ms+2ms, total 32ms
06-11 12:48:04.713    5579-5579/cooervo.happysleeper D/ProgressBar﹕ setProgressDrawable mProgressDrawable = null, d = android.graphics.drawable.LayerDrawable@428b7b18needUpdate = false
06-11 12:48:04.723    5579-5579/cooervo.happysleeper D/ProgressBar﹕ setProgress = 0
06-11 12:48:04.723    5579-5579/cooervo.happysleeper D/ProgressBar﹕ setProgress = 0, fromUser = false
06-11 12:48:04.723    5579-5579/cooervo.happysleeper D/ProgressBar﹕ mProgress = 0mIndeterminate = false, mMin = 0, mMax = 100
06-11 12:48:04.733    5579-5579/cooervo.happysleeper W/ResourceType﹕ Failure getting entry for 0x010802c8 (t=7 e=712) in package 0 (error -75)
06-11 12:48:04.733    5579-5579/cooervo.happysleeper D/ProgressBar﹕ setProgressDrawable mProgressDrawable = null, d = android.graphics.drawable.LayerDrawable@428880b8needUpdate = false
06-11 12:48:04.733    5579-5579/cooervo.happysleeper D/ProgressBar﹕ setProgress = 0
06-11 12:48:04.733    5579-5579/cooervo.happysleeper D/ProgressBar﹕ setProgress = 0, fromUser = false
06-11 12:48:04.733    5579-5579/cooervo.happysleeper D/ProgressBar﹕ mProgress = 0mIndeterminate = false, mMin = 0, mMax = 100
06-11 12:48:04.733    5579-5579/cooervo.happysleeper W/ResourceType﹕ Failure getting entry for 0x010802c8 (t=7 e=712) in package 0 (error -75)
06-11 12:48:04.733    5579-5579/cooervo.happysleeper D/ProgressBar﹕ setProgressDrawable mProgressDrawable = null, d = android.graphics.drawable.LayerDrawable@42883390needUpdate = false
06-11 12:48:04.733    5579-5579/cooervo.happysleeper D/ProgressBar﹕ setProgress = 0
06-11 12:48:04.733    5579-5579/cooervo.happysleeper D/ProgressBar﹕ setProgress = 0, fromUser = false
06-11 12:48:04.733    5579-5579/cooervo.happysleeper D/ProgressBar﹕ mProgress = 0mIndeterminate = false, mMin = 0, mMax = 100
06-11 12:48:04.743    5579-5579/cooervo.happysleeper W/ResourceType﹕ Failure getting entry for 0x010802c8 (t=7 e=712) in package 0 (error -75)
06-11 12:48:04.743    5579-5579/cooervo.happysleeper V/MediaPlayer﹕ constructor
06-11 12:48:04.743    5579-5579/cooervo.happysleeper V/MediaPlayer﹕ setListener
06-11 12:48:04.743    5579-5579/cooervo.happysleeper V/MediaPlayer﹕ setDataSource(40, 209028, 34888992)
06-11 12:48:04.753    5579-5579/cooervo.happysleeper V/MediaPlayer﹕ setVideoSurfaceTexture
06-11 12:48:04.753    5579-5579/cooervo.happysleeper V/MediaPlayer﹕ prepare
06-11 12:48:04.763    5579-5593/cooervo.happysleeper V/MediaPlayer﹕ message received msg=5, ext1=0, ext2=0
06-11 12:48:04.763    5579-5593/cooervo.happysleeper V/MediaPlayer﹕ New video size 0 x 0
06-11 12:48:04.763    5579-5593/cooervo.happysleeper V/MediaPlayer﹕ callback application
06-11 12:48:04.763    5579-5593/cooervo.happysleeper V/MediaPlayer﹕ back from callback
06-11 12:48:04.763    5579-5590/cooervo.happysleeper V/MediaPlayer﹕ message received msg=1, ext1=0, ext2=0
06-11 12:48:04.763    5579-5590/cooervo.happysleeper V/MediaPlayer﹕ prepared
06-11 12:48:04.763    5579-5590/cooervo.happysleeper V/MediaPlayer﹕ signal application thread
06-11 12:48:04.763    5579-5590/cooervo.happysleeper V/MediaPlayer﹕ callback application
06-11 12:48:04.763    5579-5590/cooervo.happysleeper V/MediaPlayer﹕ back from callback
06-11 12:48:04.763    5579-5579/cooervo.happysleeper V/MediaPlayer﹕ prepare complete - status=0
06-11 12:48:04.763    5579-5579/cooervo.happysleeper V/MediaPlayer﹕ start
06-11 12:48:04.783    5579-5579/cooervo.happysleeper I/MediaPlayer﹕ Don't send intent. msg.arg1 = 0, msg.arg2 = 0
06-11 12:48:04.864    5579-5579/cooervo.happysleeper D/libEGL﹕ loaded /system/lib/egl/libEGL_mali.so
06-11 12:48:04.894    5579-5579/cooervo.happysleeper D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_mali.so
06-11 12:48:04.904    5579-5579/cooervo.happysleeper D/libEGL﹕ loaded /system/lib/egl/libGLESv2_mali.so
06-11 12:48:04.954    5579-5579/cooervo.happysleeper D/OpenGLRenderer﹕ Enabling debug mode 0

I can't find any documentation on this issue, anyone has any ideas what to do to solve this?

1

There are 1 answers

0
CommonSenseCode On BEST ANSWER

I seem to have resolved the issue, I had the original sound file in *.wav format I used some music file converter I found online and used to convert it form *.wav to *.mp3 which drastically reduced it's size. Now it's working just fine even on my device.