florent37 / Flutter-AssetsAudioPlayer

Play simultaneously music/audio from assets/network/file directly from Flutter, compatible with android / ios / web / macos, displays notifications
https://pub.dartlang.org/packages/assets_audio_player
Apache License 2.0
757 stars 368 forks source link

Bug playing asset on Android 13 #751

Open xSuperMu opened 1 year ago

xSuperMu commented 1 year ago

assetsAudioPlayer.open(Audio("assets/sounds/module_1/$filename.mp3"));

I'm also facing the same error

Testing on Emulator, [emu64a, sdk_gphone64_arm64, Google, 33] Android 13 (sdk 33)

What Happened

The works for just fine, playing audio successfully for some screens, and for one of the screens, I suddenly get that error message.

I/ExoPlayerImpl( 7556): Release 37cb05c [ExoPlayerLib/2.18.1] [emu64a, sdk_gphone64_arm64, Google, 33] [goog.exo.core, goog.exo.exoplayer, goog.exo.decoder, goog.exo.datasource, goog.exo.extractor]
D/CCodecBuffers( 7556): [c2.android.mp3.decoder#70:1D-Output.Impl[N]] Client returned a buffer it does not own according to our record: 0
D/CCodecBuffers( 7556): [c2.android.mp3.decoder#70:1D-Output.Impl[N]] Client returned a buffer it does not own according to our record: 1
D/CCodecBuffers( 7556): [c2.android.mp3.decoder#70:1D-Output.Impl[N]] Client returned a buffer it does not own according to our record: 2
D/MediaCodec( 7556): keep callback message for reclaim
I/CCodecConfig( 7556): query failed after returning 7 values (BAD_INDEX)
W/Codec2Client( 7556): query -- param skipped: index = 1342179345.
W/Codec2Client( 7556): query -- param skipped: index = 2415921170.
4
D/CCodecBufferChannel( 7556): [c2.android.mp3.decoder#70] MediaCodec discarded an unknown buffer
I/hw-BpHwBinder( 7556): onLastStrongRef automatically unlinking death recipients
I/ExoPlayerImpl( 7556): Init 6fae88c [ExoPlayerLib/2.18.1] [emu64a, sdk_gphone64_arm64, Google, 33]
I/ExoPlayerImpl( 7556): Release 6fae88c [ExoPlayerLib/2.18.1] [emu64a, sdk_gphone64_arm64, Google, 33] [goog.exo.core, goog.exo.exoplayer, goog.exo.decoder, goog.exo.datasource, goog.exo.extractor]
V/MediaPlayer( 7556): resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer( 7556): cleanDrmObj: mDrmObj=null mDrmSessionId=null
W/System.err( 7556): com.github.florent37.assets_audio_player.playerimplem.PlayerFinder$NoPlayerFoundException
W/System.err( 7556): atcom.github.florent37.assets_audio_player.playerimplem.PlayerFinder._findWorkingPlayer(PlayerFinder.kt:70)
W/System.err( 7556):    at com.github.florent37.assets_audio_player.playerimplem.PlayerFinder._findWorkingPlayer(PlayerFinder.kt:88)
W/System.err( 7556):    at com.github.florent37.assets_audio_player.playerimplem.PlayerFinder.access$_findWorkingPlayer(PlayerFinder.kt:26)
W/System.err( 7556):    at com.github.florent37.assets_audio_player.playerimplem.PlayerFinder$_findWorkingPlayer$1.invokeSuspend(Unknown Source:15)
W/System.err( 7556):    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
W/System.err( 7556):    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
W/System.err( 7556):    at android.os.Handler.handleCallback(Handler.java:942)
W/System.err( 7556):    at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err( 7556):    at android.os.Looper.loopOnce(Looper.java:201)
W/System.err( 7556):    at android.os.Looper.loop(Looper.java:288)
W/System.err( 7556):    at android.app.ActivityThread.main(ActivityThread.java:7872)
W/System.err( 7556):    at java.lang.reflect.Method.invoke(Native Method)
W/System.err( 7556):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
W/System.err( 7556):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
D/BufferPoolAccessor2.0( 7556): bufferpool2 0xb4000071d1e3ba88 : 0(0 size) total buffers - 0(0 size) used buffers - 179/184 (recycle/alloc) - 5/356 (fetch/transfer)
D/BufferPoolAccessor2.0( 7556): bufferpool2 0xb4000071d1efcc08 : 0(0 size) total buffers - 0(0 size) used buffers - 54/59 (recycle/alloc) - 5/106 (fetch/transfer)
D/BufferPoolAccessor2.0( 7556): evictor expired: 2, evicted: 2
D/BufferPoolAccessor2.0( 7556): evictor expired: 1, evicted: 0
D/BufferPoolAccessor2.0( 7556): bufferpool2 0xb4000071d1eeb438 : 0(0 size) total buffers - 0(0 size) used buffers - 131/136 (recycle/alloc) - 5/260 (fetch/transfer)
D/BufferPoolAccessor2.0( 7556): evictor expired: 1, evicted: 1
[✓] Flutter (Channel stable, 3.3.10, on macOS 13.1 22C65 darwin-arm, locale
    en-EG)
    • Flutter version 3.3.10 on channel stable at
      /Users/muhammadelsayed/Documents/PRO/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 135454af32 (3 weeks ago), 2022-12-15 07:36:55 -0800
    • Engine revision 3316dd8728
    • Dart version 2.18.6
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/muhammadelsayed/Library/Android/sdk
    • Platform android-33, build-tools 30.0.3
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      11.0.13+0-b1751.21-8125866)

[✓] VS Code (version 1.74.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.56.0

[✓] Connected device (3 available)
    • CPH1989 (mobile) • adb-TOCEA6MB5LOJYDCI-cTGp5h._adb-tls-connect._tcp. •
      android-arm64  • Android 11 (API 30)
    • macOS (desktop)  • macos                                              •
      darwin-arm64   • macOS 13.1 22C65 darwin-arm
    • Chrome (web)     • chrome                                             •
      web-javascript • Google Chrome 108.0.5359.124

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!