Imporved AndroidAudioRenderer

Limitations:

  • SoundPool does neither give any information about the duration of the audiotrack nor if the track finished playing. So if you playInstance() twice and the first did not finish playing you can only stop the last track reference
  • Playing long Sounds (like Ocean Waves.ogg from the test data) takes the SoundPool a long time (~4 secs) to load the first time! Playing then works good. It would be nice to be able to tell the audio node to precache it…



    patch (created in the engine directory)



    Let me know what you think
1 Like

I applied your patch. Hopefully it helps people as there were a lot of complaining about incorrect looping and the playInstance() issue.

For the Android API issues, there’s some explanation and maybe fixes here: http://mindtherobot.com/blog/555/android-audio-problems-hidden-limitations-and-opensl-es/

Also OpenSL ES is supported on Android but only in native code, perhaps it would be viable to write a Java wrapper for it that can be used in jME3

well then thx for the link i will dig deeper the next days!