Galaxy SIII: strange behaviour with mediaplayer

Djembefola

Active Member
Licensed User
Longtime User
In my app a cursor (an imageview) is animated, while an audio file
is played with mediaplayer. The left and top position of the imageview
depends on the current song position (which can be determined via the
mediaplayer .position property).

There is a timer in my app with an interval set to 10.
In the timer_tick event mediaplayer .position is determined
and imageview .left and .top are set to a value depending on
the current song position.

This has always worked fine and resulted in a smooth animation on all
devices i ever have tested. But on Galaxy SIII the animation looks horrible:
the imageview jumps over the screen like a sprite in a 1978 videogame.
The position is only updated 4 or 5 times per second.

I have printed mediaplayer .position to the log and seen that 30 or
more calls return the same position before the value is updated.
Seems to me that the value is cached and not updated properly.

This happens only with Galaxy SIII, on all other tested devices
(Galaxy SII, Galaxy Tab 2 and many others) the returned values are much
more accurate.

Is this a hardware problem?
Any idea how to handle it?
 

Djembefola

Active Member
Licensed User
Longtime User
Seems like a device issue.

Meanwhile i could fix it with a workaround: i use a static (global) var in the timer tick event and set position to lastposition+15ms, if the returned value has not changed. Dirty programming, but working.

i still wonder where this behaviour comes from. Perhaps a quad core issue.
 
Upvote 0
Top