Jump to content

  • Log In with Google      Sign In   
  • Create Account


OpenSL GetPosition()


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 subi211   Members   -  Reputation: 133

Like
0Likes
Like

Posted 02 April 2014 - 11:34 AM

I have a problem with OpenSL on various different Android devices.

 

The OpenSL spec states that SLPlayItf::GetPosition() should return "the position of the playback head relative to the beginning of the content, expressed in milliseconds... In the case where the data source is a buffer queue, the current position is the cumulative duration of all buffers since the last buffer queue Clear() method".

 

However, on some devices (Nexus 7, HTC One) this is not the case. GetPosition() only takes the current buffer into account, not all that have passed. In fact, the only devices that seem to impliment GetPosition() correctly are Samsung ones. Android version doesn't seem to be an issue here.

 

Obviously it's easy enough to cope with one or the other, the problem is detecting if the bug is present or not. Unfortunatly it seems that the position can be reported as over the end of the current buffer even if the bug is present if the app gets paused (by switching or attaching a debugger), so that can't be used to detect correct implimentation.

 

Has anyone else encountered this issue and got round it in a clever manner?


Edited by subi211, 02 April 2014 - 11:36 AM.


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS