Hello! I am having some fun with OpenSL, linking sound to sensor movements. Specifically, I am trying to update the a sound buffer with sensor updates for the lowest latency in between sensor events and sound. I have the sensors running in their own maximum priority thread (in Java), and the Android SimpleBufferQueue OpenSL callbacks obviously occur in their own high priority thread too.
The problem is when I am counting the updates, I get the following repeating pattern:
2 x Audio Callback - 4 x Sensor Update
The problem is that on the second callback, there has been no sensor update. I realise this is a very small period of time, but is there any way to make the sensor updates to occur between the callbacks, i.e. to yield the callbacks to allow the sensor updates to come through?
Many thanks!