Other Is your MediaPlayer stuttering?

Robert Valentino

Well-Known Member
Licensed User
Longtime User
On my Samsung S2 Tablet (SM-T210R) and on my Samsung Phone S7 the music App I am working on sometimes Stutters. A lot more stuttering on the slower S2 Tablet then on the faster S7 Phone.

This was driving me crazy. Thought I was eating too many cycles up, and nothing I did changed or fixed the problem.

So I did a Google search I and came up with this link: https://stackoverflow.com/questions...layer-getcurrentposition-causes-audio-stutter

In the above link it talks about GetPosition causing stuttering and I was referencing the MediaPlayer .Duration and .Position functions a lot.

In one window it was counting down the seconds left (so it was getting .Duration and .Position) and in the main timer server I was checking (every second) to see if there was 7 or less seconds left (this was calling the .Duration and .Position this was in order to pre-start another player so one song rolled into another without dead space).

After reading the comments, I create variables that my main timer server updated and stopped using MediaPlayer to get this values.

As SOON as I did this everything plays MUCH smoother and a little stuttering on the slower device and NONE on the faster one.

Just wanted to past this information along in case anyone else was experiencing this problem

BobVal
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…