Android Question Pausing and playing audio with Media Player library

cbanks

Active Member
Licensed User
Longtime User
I'm using Android 4.4.x. When I pause an audio file that is playing and then play it again, it stops playing after about half a second and the event completes within a couple seconds. Why is that?
 
Last edited:

stevel05

Expert
Licensed User
Longtime User
Works as expected here Asus Nexus 7 Android 4.2.2

Do you get an error if you run in Debug mode?
 
Upvote 0

cbanks

Active Member
Licensed User
Longtime User
Works as expected here Asus Nexus 7 Android 4.2.2

Do you get an error if you run in Debug mode?

There is no error in debug mode. This problem is happening to me on two separate Cyanogenmod 11 (4.4.x) devices. When I install Android 4.1 or 4.3 on these devices, this problem does not happen. This problem doesn't happen when I use an emulator. Any other ideas?
 
Last edited:
Upvote 0

stevel05

Expert
Licensed User
Longtime User
I notice that there is no code in the Player_Complete sub, does it definitely run that when it stops early?
 
Upvote 0

cbanks

Active Member
Licensed User
Longtime User
I notice that there is no code in the Player_Complete sub, does it definitely run that when it stops early?

Yes, I have added code to that sub and it definitely hits that sub after pressing play again after pausing.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
I'm not sure we are going to get to the bottom of this one. I couldn't find anything on the net about cyanogenmod issues with media player. Do you have their latest build?
 
Upvote 0

cbanks

Active Member
Licensed User
Longtime User
I'm not sure we are going to get to the bottom of this one. I couldn't find anything on the net about cyanogenmod issues with media player. Do you have their latest build?

Yes, latest builds for Nook Tablet 8GB and Samsung Galaxy S1
 
Upvote 0

ultrabyte

Member
Licensed User
Longtime User
@cbanks
I'm experiencing the same behavior with cyanogenmod on my nexus.
Did you find a solution to solve it?
Player_Complete sub is getting called,but doens't play as expected

Sub MediaPlayer1_Complete

Log("MediaPlayer1 complete called")

MediaPlayer1.Position = 0.0

MediaPlayer1.Play

End Sub
 
Upvote 0
Top