audioplayer
audioplayer copied to clipboard
Not playing on LG 440
I am having troubles playing with the audio player on a LG440H: (Android 6.01, 16 GB SDCard)
this is the error I am getting. The same app works OK on a Nexus 7.
I/flutter (12152): soundfile path = /data/user/0/com.yourcompany.muze/app_flutter/sound/Schippers-hetoverhevelenvangewicht-toelichting.mp3
E/ExtMediaPlayer-JNI(12152): QCMediaPlayer could not be located....
D/MediaPlayer-JNI(12152): JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
E/ExtMediaPlayer-JNI(12152): QCMediaPlayer could not be located....
D/MediaPlayer-JNI(12152): JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
V/MediaPlayerNative: constructor
D/AudioSystem(12152): getIoDescriptor: ioHandle = 2, index = -2, mIoDescriptors = 0xb9cddd28
V/AudioSystem(12152): ioConfigChanged: [Update mIoDescriptors] add ioHandle = 2 -> descriptor = 0xa0be977c
V/AudioSystem(12152): ioConfigChanged() new output opened 2 samplingRate 48000, format 0x1 channel mask 0x3 frameCount 960 deviceId 2
D/AudioSystem(12152): getIoDescriptor: ioHandle = 4, index = -2, mIoDescriptors = 0xb9cddd28
V/AudioSystem(12152): ioConfigChanged: [Update mIoDescriptors] add ioHandle = 4 -> descriptor = 0xa0be977c
V/AudioSystem(12152): ioConfigChanged() new output opened 4 samplingRate 48000, format 0x5 channel mask 0x3 frameCount 960 deviceId 2
V/MediaPlayerNative: setListener
V/MediaPlayerNative: MediaPlayer::setAudioStreamType
V/MediaPlayerNative: setDataSource(61, 0, 576460752303423487)
E/MediaPlayerNative: Unable to create media player
W/System.err(12152): java.io.IOException: setDataSourceFD failed.: status=0x80000000
W/System.err(12152): at android.media.MediaPlayer._setDataSource(Native Method)
W/System.err(12152): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1133)
W/System.err(12152): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1118)
W/System.err(12152): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1097)
W/System.err(12152): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1046)
W/System.err(12152): at bz.rxla.audioplayer.AudioplayerPlugin.play(AudioplayerPlugin.java:85)
W/System.err(12152): at bz.rxla.audioplayer.AudioplayerPlugin.onMethodCall(AudioplayerPlugin.java:44)
W/System.err(12152): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191)
W/System.err(12152): at io.flutter.view.FlutterView.handlePlatformMessage(FlutterView.java:690)
W/System.err(12152): at android.os.MessageQueue.nativePollOnce(Native Method)
W/System.err(12152): at android.os.MessageQueue.next(MessageQueue.java:323)
W/System.err(12152): at android.os.Looper.loop(Looper.java:135)
W/System.err(12152): at android.app.ActivityThread.main(ActivityThread.java:5527)
W/System.err(12152): at java.lang.reflect.Method.invoke(Native Method)
W/System.err(12152): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
W/System.err(12152): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
D/AUDIO (12152): invalid DataSource
V/MediaPlayerNative: setVideoSurfaceTexture
V/MediaPlayerNative: setVideoSurfaceTexture: 0x0 mPlayer: NO_INIT
V/MediaPlayerNative: prepare
E/MediaPlayerNative: prepareAsync called in state 1
E/MethodChannel#bz.rxla.flutter/audio(12152): Failed to handle method call
E/MethodChannel#bz.rxla.flutter/audio(12152): java.lang.IllegalStateException
E/MethodChannel#bz.rxla.flutter/audio(12152): at android.media.MediaPlayer._prepare(Native Method)
E/MethodChannel#bz.rxla.flutter/audio(12152): at android.media.MediaPlayer.prepare(MediaPlayer.java:1163)
E/MethodChannel#bz.rxla.flutter/audio(12152): at bz.rxla.audioplayer.AudioplayerPlugin.play(AudioplayerPlugin.java:92)
E/MethodChannel#bz.rxla.flutter/audio(12152): at bz.rxla.audioplayer.AudioplayerPlugin.onMethodCall(AudioplayerPlugin.java:44)
E/MethodChannel#bz.rxla.flutter/audio(12152): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191)
E/MethodChannel#bz.rxla.flutter/audio(12152): at io.flutter.view.FlutterView.handlePlatformMessage(FlutterView.java:690)
E/MethodChannel#bz.rxla.flutter/audio(12152): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#bz.rxla.flutter/audio(12152): at android.os.MessageQueue.next(MessageQueue.java:323)
E/MethodChannel#bz.rxla.flutter/audio(12152): at android.os.Looper.loop(Looper.java:135)
E/MethodChannel#bz.rxla.flutter/audio(12152): at android.app.ActivityThread.main(ActivityThread.java:5527)
E/MethodChannel#bz.rxla.flutter/audio(12152): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#bz.rxla.flutter/audio(12152): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
E/MethodChannel#bz.rxla.flutter/audio(12152): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
E/flutter (12152): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter (12152): PlatformException(error, null, null)
E/flutter (12152): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:514)
E/flutter (12152): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:154)
E/flutter (12152):
After I try to load another sound ( by going to another page and reloading the sound), this is the message I am getting:
E/MediaPlayerNative: Attempt to call getDuration without a valid mediaplayer V/MediaPlayerNative: message received msg=100, ext1=-38, ext2=0 E/MediaPlayerNative: error (-38, 0) V/MediaPlayerNative: signal application thread V/MediaPlayerNative: start E/MediaPlayerNative: start called in state 0 V/MediaPlayerNative: message received msg=100, ext1=-38, ext2=0 V/MediaPlayerNative: notify(100, -38, 0) callback on disconnected mediaplayer I/flutter (12152): _platformCallHandler call audio.onDuration 1893238280 V/MediaPlayerNative: message received msg=100, ext1=-38, ext2=0 V/MediaPlayerNative: notify(100, -38, 0) callback on disconnected mediaplayer V/MediaPlayerNative: isPlaying: no active player I/flutter (12152): nessage in HomePage is playing V/MediaPlayerNative: isPlaying: no active player V/MediaPlayerNative: message received msg=100, ext1=-38, ext2=0 V/MediaPlayerNative: notify(100, -38, 0) callback on disconnected mediaplayer I/flutter (12152): nessage is playing I/flutter (12152): nessage is playing I/flutter (12152): nessage in HomePage is playing I/flutter (12152): nessage is playing I/flutter (12152): nessage in HomePage is playing I/flutter (12152): nessage is playing I/flutter (12152): _platformCallHandler call audio.onCurrentPosition 1893238240 V/MediaPlayerNative: isPlaying: no active player V/MediaPlayerNative: message received msg=100, ext1=-38, ext2=0
Hi, can you please try with a lowercase file name ?
No difference..
I/flutter (15116): soundfile path = /data/user/0/com.yourcompany.muze/app_flutter/sound/toelichting-bk-ja-knibbe.mp3 E/ExtMediaPlayer-JNI(15116): QCMediaPlayer could not be located.... D/MediaPlayer-JNI(15116): JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0 E/ExtMediaPlayer-JNI(15116): QCMediaPlayer could not be located.... D/MediaPlayer-JNI(15116): JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0 V/MediaPlayerNative: constructor V/MediaPlayerNative: setListener V/MediaPlayerNative: MediaPlayer::setAudioStreamType V/MediaPlayerNative: setDataSource(68, 0, 576460752303423487) D/AudioSystem(15116): getIoDescriptor: ioHandle = 2, index = -2, mIoDescriptors = 0xba78eaf8 V/AudioSystem(15116): ioConfigChanged: [Update mIoDescriptors] add ioHandle = 2 -> descriptor = 0xa0aeb77c V/AudioSystem(15116): ioConfigChanged() new output opened 2 samplingRate 48000, format 0x1 channel mask 0x3 frameCount 960 deviceId 2 E/MediaPlayerNative: Unable to create media player D/AudioSystem(15116): getIoDescriptor: ioHandle = 4, index = -2, mIoDescriptors = 0xba78eaf8 V/AudioSystem(15116): ioConfigChanged: [Update mIoDescriptors] add ioHandle = 4 -> descriptor = 0xa09ec77c V/AudioSystem(15116): ioConfigChanged() new output opened 4 samplingRate 48000, format 0x5 channel mask 0x3 frameCount 960 deviceId 2 W/System.err(15116): java.io.IOException: setDataSourceFD failed.: status=0x80000000 W/System.err(15116): at android.media.MediaPlayer._setDataSource(Native Method) W/System.err(15116): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1133) W/System.err(15116): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1118) W/System.err(15116): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1097) W/System.err(15116): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1046) W/System.err(15116): at bz.rxla.audioplayer.AudioplayerPlugin.play(AudioplayerPlugin.java:85) W/System.err(15116): at bz.rxla.audioplayer.AudioplayerPlugin.onMethodCall(AudioplayerPlugin.java:44) W/System.err(15116): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191) W/System.err(15116): at io.flutter.view.FlutterView.handlePlatformMessage(FlutterView.java:690) W/System.err(15116): at android.os.MessageQueue.nativePollOnce(Native Method) W/System.err(15116): at android.os.MessageQueue.next(MessageQueue.java:323) W/System.err(15116): at android.os.Looper.loop(Looper.java:135) W/System.err(15116): at android.app.ActivityThread.main(ActivityThread.java:5527) W/System.err(15116): at java.lang.reflect.Method.invoke(Native Method) W/System.err(15116): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730) W/System.err(15116): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) D/AUDIO (15116): invalid DataSource V/MediaPlayerNative: setVideoSurfaceTexture V/MediaPlayerNative: setVideoSurfaceTexture: 0x0 mPlayer: NO_INIT V/MediaPlayerNative: prepare E/MediaPlayerNative: prepareAsync called in state 1 E/MethodChannel#bz.rxla.flutter/audio(15116): Failed to handle method call E/MethodChannel#bz.rxla.flutter/audio(15116): java.lang.IllegalStateException E/MethodChannel#bz.rxla.flutter/audio(15116): at android.media.MediaPlayer._prepare(Native Method) E/MethodChannel#bz.rxla.flutter/audio(15116): at android.media.MediaPlayer.prepare(MediaPlayer.java:1163) E/MethodChannel#bz.rxla.flutter/audio(15116): at bz.rxla.audioplayer.AudioplayerPlugin.play(AudioplayerPlugin.java:92) E/MethodChannel#bz.rxla.flutter/audio(15116): at bz.rxla.audioplayer.AudioplayerPlugin.onMethodCall(AudioplayerPlugin.java:44) E/MethodChannel#bz.rxla.flutter/audio(15116): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191) E/MethodChannel#bz.rxla.flutter/audio(15116): at io.flutter.view.FlutterView.handlePlatformMessage(FlutterView.java:690) E/MethodChannel#bz.rxla.flutter/audio(15116): at android.os.MessageQueue.nativePollOnce(Native Method) E/MethodChannel#bz.rxla.flutter/audio(15116): at android.os.MessageQueue.next(MessageQueue.java:323) E/MethodChannel#bz.rxla.flutter/audio(15116): at android.os.Looper.loop(Looper.java:135) E/MethodChannel#bz.rxla.flutter/audio(15116): at android.app.ActivityThread.main(ActivityThread.java:5527) E/MethodChannel#bz.rxla.flutter/audio(15116): at java.lang.reflect.Method.invoke(Native Method) E/MethodChannel#bz.rxla.flutter/audio(15116): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730) E/MethodChannel#bz.rxla.flutter/audio(15116): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) E/flutter (15116): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception: E/flutter (15116): PlatformException(error, null, null)
I found this in the meantime, it seems more people have this problem on LG phones.
I did got it to run properly on a Sony E233 (Experia M4 Aqua).
https://stackoverflow.com/questions/24501086/why-mediaplayer-throws-not-present-error-when-creating-instance-of-it
Oh, and this.
https://stackoverflow.com/questions/9888510/mediaplayer-error-19-0-after-repeated-plays,
Especially the message about the onCreate and mp.reset, so that the mediaplayer only gets created once might bear a solution.
I am having the same issue, but my phone is a LG K130
any news? I have the same issue.