The trouble with testsounds on Android - App freezing

User avatar
lordfingle
Member
 
Posts: 65
Joined: Sat Apr 04, 2015 09:21
GitHub: eidy
IRC: lordfingle
In-game: lordfingle

The trouble with testsounds on Android - App freezing

by lordfingle » Tue Oct 25, 2016 05:22

If you have a "testsounds" folder, sounds will be played from there directly (on the client) rather than being downloaded via the media load.

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?
----------------------------------------------------------------------------------------------
Team Lead on "eidy- Love learning"
I like reading, walks on the beach and building edutech experiences in lua (Find out more in this post)
"Coming together is a beginning; keeping together is progress; working together is success." - Henry Ford
 

User avatar
MineYoshi
Member
 
Posts: 4267
Joined: Wed Jul 08, 2015 13:20
GitHub: MineYosh
IRC: MineYoshi
In-game: Kirby_Retro

Re: The trouble with testsounds on Android - App freezing

by MineYoshi » Sat Oct 29, 2016 22:56

Try to compile with most new and recent OpenAL lib?
People talk about freedom of speech, so i'll say that God exists.
Open your eyes!! See The big unicorn conspiracy.!! :D The government has been lying to us about unicorns!!
"I've learned there are three things you don't discuss with people: religion, politics and the Great Pumpkin" - Linus Van Pelt
I'm the Officially 1st ABJist in the world ( ͡° ͜ʖ ͡°)
 

User avatar
lordfingle
Member
 
Posts: 65
Joined: Sat Apr 04, 2015 09:21
GitHub: eidy
IRC: lordfingle
In-game: lordfingle

Re: The trouble with testsounds on Android - App freezing

by lordfingle » Thu Nov 03, 2016 21:54

Thanks @MineYoshi. I'll try.

So currently the minetest build uses this version - https://github.com/apportable/openal-soft

I couldn't see any update except for this branch - https://github.com/apportable/openal-soft/tree/li-merge

I'll try using this.
----------------------------------------------------------------------------------------------
Team Lead on "eidy- Love learning"
I like reading, walks on the beach and building edutech experiences in lua (Find out more in this post)
"Coming together is a beginning; keeping together is progress; working together is success." - Henry Ford
 

User avatar
MineYoshi
Member
 
Posts: 4267
Joined: Wed Jul 08, 2015 13:20
GitHub: MineYosh
IRC: MineYoshi
In-game: Kirby_Retro

Re: The trouble with testsounds on Android - App freezing

by MineYoshi » Mon Nov 07, 2016 20:57

Well...

Did compiling work?
People talk about freedom of speech, so i'll say that God exists.
Open your eyes!! See The big unicorn conspiracy.!! :D The government has been lying to us about unicorns!!
"I've learned there are three things you don't discuss with people: religion, politics and the Great Pumpkin" - Linus Van Pelt
I'm the Officially 1st ABJist in the world ( ͡° ͜ʖ ͡°)
 

User avatar
lordfingle
Member
 
Posts: 65
Joined: Sat Apr 04, 2015 09:21
GitHub: eidy
IRC: lordfingle
In-game: lordfingle

Re: The trouble with testsounds on Android - App freezing

by lordfingle » Mon Nov 14, 2016 08:44

Tried it, no it didn't. Freezing is still happening.
----------------------------------------------------------------------------------------------
Team Lead on "eidy- Love learning"
I like reading, walks on the beach and building edutech experiences in lua (Find out more in this post)
"Coming together is a beginning; keeping together is progress; working together is success." - Henry Ford
 

User avatar
lordfingle
Member
 
Posts: 65
Joined: Sat Apr 04, 2015 09:21
GitHub: eidy
IRC: lordfingle
In-game: lordfingle

Re: The trouble with testsounds on Android - App freezing

by lordfingle » Tue Nov 15, 2016 07:26

I guess the main issue is that OpenALManager doesn't like loading a whole bunch of sound files simultaenously which is what this does:

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

Therefore I'll rename the music files to unique names and randomly choose them myself.
(eg original ambience mod)
----------------------------------------------------------------------------------------------
Team Lead on "eidy- Love learning"
I like reading, walks on the beach and building edutech experiences in lua (Find out more in this post)
"Coming together is a beginning; keeping together is progress; working together is success." - Henry Ford
 


Return to Minetest Engine

Who is online

Users browsing this forum: No registered users and 4 guests

cron