Additionally the "0-9" suffix functionality randomly chooses between a number of similarly named files.
In my case:
SoundTrack.0.ogg
SoundTrack.1.ogg
SoundTrack.2.ogg
SoundTrack.3.ogg
SoundTrack.4.ogg
SoundTrack.5.ogg
SoundTrack.6.ogg
SoundTrack.7.ogg
SoundTrack.8.ogg
SoundTrack.9.ogg
I am using the "ambience" mod.
On Android, combining these causes a rather nasty side effect. It appears that the minetest engine tries to load all sounds from a folder into MEMORY before choosing one to play.
This resulted in freezes up to a minute on Android. It eventually unfreezes.
Here's a log:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
D/eidy ( 6772): 2016-10-24 18:25:41: INFO[Main]: Audio file /storage/emulated/0/eidy/testsounds/SoundTrack.0.ogg loaded
E/ActivityManager( 528): 98% 6790/eidyNativeThrea: 96% user + 1.9% kernel
D/eidy ( 6772): 2016-10-24 18:25:53: INFO[Main]: Audio file /storage/emulated/0/eidy/testsounds/SoundTrack.1.ogg loaded
D/eidy ( 6772): 2016-10-24 18:26:03: INFO[Main]: Audio file /storage/emulated/0/eidy/testsounds/SoundTrack.2.ogg loaded
E/ActivityManager( 528): 98% 6790/eidyNativeThrea: 98% user + 0% kernel
D/eidy ( 6772): 2016-10-24 18:26:16: INFO[Main]: Audio file /storage/emulated/0/eidy/testsounds/SoundTrack.3.ogg loaded
So I think the issue is:
- Large (1 minute) music files seem to randomly take a very long time to load
- The "random" functionality loads all files of a certain suffix prior to randomly choosing between them
The cause of the issue may be the "OpenAL" library. There have been reports of early versions of this library causing hangs on Android.
So perhaps the solution is to replace the sound engine with something else?
Opinions?