I have been trying on and off for the last month or more on ways to get the MediaPlayer to load and play a song and not delay the rest of the execution of my game. It seems like the delay occurs when the .Load() function is called, and nothing I can do seems to get me around this. Tried using CallSubDelayed and even have the entire procedure that loads and plays a song on a separate dedicated timer that is separate from my main timer that I use for everything else.
I looked into the MediaPlayerStream but could not find a way to load from a local location. Tried for a while working with using "file:///android_asset/" URI, but just kept getting a generic error in the StreamError procedure. My guess is I can't use use this method.
The delay is not very long, maybe 1/2 to 1 and 1/2 seconds, but is something I would really like to eliminate. The audio files are OGG format, added to the Files tab, anywhere between 200kb and 2.7mb (it doesn't seem like it really matters which one I call to cause the delay).
I am using a little bit older version (3.20), so have wondered if this may have been resolved with a newer version. (I did try looking through any release notes I could find). I have also tried looking at maybe calling a JavaObject to do this?
Thanks.
I looked into the MediaPlayerStream but could not find a way to load from a local location. Tried for a while working with using "file:///android_asset/" URI, but just kept getting a generic error in the StreamError procedure. My guess is I can't use use this method.
The delay is not very long, maybe 1/2 to 1 and 1/2 seconds, but is something I would really like to eliminate. The audio files are OGG format, added to the Files tab, anywhere between 200kb and 2.7mb (it doesn't seem like it really matters which one I call to cause the delay).
I am using a little bit older version (3.20), so have wondered if this may have been resolved with a newer version. (I did try looking through any release notes I could find). I have also tried looking at maybe calling a JavaObject to do this?
Thanks.