Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to call getDuration in wrong state: mPlayer=0x7a0c862fc0, mCurrentState=0 #588

Closed
echohuub opened this issue Jul 24, 2020 · 8 comments
Labels
waiting for report Wait for the author to respond to the conversation

Comments

@echohuub
Copy link

Multiple Loop BGM switching, occasionally unable to play error

E/MediaPlayerNative(25407): Attempt to call getDuration in wrong state: mPlayer=0x7a0c862fc0, mCurrentState=0
D/MediaPlayerNative(25407): Message: MEDIA_ERROR(100), ext1=Unknown MediaErrorType(-38), ext2=0x0
E/MediaPlayerNative(25407): error (-38, 0)
E/MediaPlayer(25407): Error (-38,0)
V/PlayerBase(25407): baseStop() piid=4879
I/MediaPlayer(25407): [HSM] stayAwake false uid: 11336, pid: 25407
@ReniDelonzek
Copy link

I have same problem

@Lix-ai
Copy link

Lix-ai commented Oct 13, 2020

me to

@frostextreme11
Copy link

I have the same problem, no solutions yet?

@dannycortesv
Copy link

I'm also having this issue....

@ton-An
Copy link

ton-An commented Mar 20, 2021

Adding a 100ms delay between audioPlayer.play and audioPlayer.getDuration semms to have 'fixed' it for me.
Not a pretty fix but better than nothing

@erickzanardo
Copy link
Member

You must have called called getDuration before the player be ready, You need to use the events listener for when the player is ready, and then call the duration.

@erickzanardo erickzanardo added the waiting for report Wait for the author to respond to the conversation label Apr 13, 2021
@erickzanardo
Copy link
Member

Closing due inactivity, if there is more info that you can add to the issue, comment here and we can re open the issue.

@saquelain
Copy link

AudioPlayer audioPlayer = AudioPlayer(mode: PlayerMode.LOW_LATENCY);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for report Wait for the author to respond to the conversation
Projects
None yet
Development

No branches or pull requests

8 participants