mehranshoqi / voice_message_player

Play / Show voice messages in your Flutter application.
https://mehran.app
MIT License
72 stars 108 forks source link

Error initializing the audio - audio plays without sound #31

Open Ahmed-Tarek-Designfy opened 11 months ago

Ahmed-Tarek-Designfy commented 11 months ago

The case for me is when I go to the gallery to attach an image and try to play the voice again it gives me that error and then the voice plays without sound.

If this error happens once, the issue exists even when I close the screen and return to it again, all the voices in the app give the same error and play without sound. The only way this error goes away is to reload the app.

V/AudioTrack(15931): Building AudioTrack with attributes: usage=1 content=2 flags=0x200 tags=[] E/android.media.AudioTrack(15931): Error code -20 when initializing AudioTrack. E/MediaCodecAudioRenderer(15931): at android.os.Looper.loop(Looper.java:201) E/ExoPlayerImplInternal(15931): at android.os.Looper.loop(Looper.java:201) E/ExoPlayerImplInternal(15931): at com.google.android.exoplayer2.audio.DefaultAudioSink.handleBuffer(DefaultAudioSink.java:929) E/ExoPlayerImplInternal(15931): at com.google.android.exoplayer2.audio.MediaCodecAudioRenderer.processOutputBuffer(MediaCodecAudioRenderer.java:709) E/ExoPlayerImplInternal(15931): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1889) E/ExoPlayerImplInternal(15931): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:782) E/ExoPlayerImplInternal(15931): at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1007) E/ExoPlayerImplInternal(15931): at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:502) E/ExoPlayerImplInternal(15931): ... 3 more E/ExoPlayerImplInternal(15931): Suppressed: com.google.android.exoplayer2.audio.AudioSink$InitializationException: AudioTrack init failed 0 Config(16000, 4, 10304) Format(null, null, null, audio/raw, null, -1, null, [-1, -1, -1.0], [1, 16000]) E/ExoPlayerImplInternal(15931): ... 13 more E/AudioPlayer(15931): TYPE_RENDERER: AudioTrack init failed 0 Config(16000, 4, 10304) Format(null, null, null, audio/raw, null, -1, null, [-1, -1, -1.0], [1, 16000])

dmitryudin commented 9 months ago

Столкнулся с такой же ошибкой, пока не нашел решения.