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.