[BUG] Sound not working on Android for version 3.3.0-alpha5

Hi @sgold,
I am testing the latest build on android and found a problem where my sound fx and music does not want to play.
I have tested it against version 3.2.4-stable which worked.

I think it is related to some code changes here:

I have zero Android development experience, so I’m not the best person to troubleshoot Android issues.

Assuming this is a build issue, the next step would be to test with current master (or 3.3.0-beta1, whenever that re-appears). There were major changes in the build process between 3.3.0-alpha2 & 3.3.0-alpha5 and also between 3.3.0-alpha5 & current master. If the former changes broke Android sound, perhaps the latter changes will resolve the issue.

(I mention 3.3.0-alpha2 because 3.2.4 was built from the old v3.2 branch, so it’s even further removed from 3.3.0-alpha5 than 3.3.0-alpha2 is. I’m slightly curious whether the issue exists in 3.3.0-alpha2, which pre-dates the commit you cited.)

Thanks @sgold I will give it a try and give you feedback of my findings.

1 Like

So I tried with version 3.3.0-alpha2 and the sound worked again.
It seems that you might be right. Something broke with the android sound between 3.3.0-alpha2 and 3.3.0-alpha5.

1 Like

Then you’re probably right about PR 1171 being involved. Let’s wait and see whether this is fixed in 3.3.0-beta1 or not.

When is the plan to release a full 3.3.0-beta1?

1 Like

Soon. I did it once but the build was screwed up. Since then I’ve barely had time to sleep and I eat while taking a shit (not literally… but not far off either).

I’m off starting Friday so will look into it then.

2 Likes

Thanks @pspeed. I am looking forward to testing the upcoming release.

1 Like

PS: These snowflakes in the background is making me dizzy…

Hehehe.

1 Like

Seems that PR is authored by @Darkchaos . He may know what is going wrong. Seems a bunch of native files has been deleted by that PR ?? :man_shrugging:

jme3-android-native/src/native/jme_openalsoft/com_jme3_audio_android_AndroidAL.h

jme3-android-native/src/native/jme_openalsoft/com_jme3_audio_android_AndroidALC.h

jme3-android-native/src/native/jme_openalsoft/com_jme3_audio_android_AndroidEFX.h
2 Likes

@ndebruyn is there any exception, log or stack trace from issue when playing the sound?

Tried it on my side using JME 3.3.0-beta1, the app just gets shutdown without throwing any exception when playing sound.

I replaced "org.jmonkeyengine:jme3-android-native:3.3.0-beta1" with "org.jmonkeyengine:jme3-android-native:3.3.0-alpha2" and it worked.

Most probably an issue with the compiled "libopenalsoftjme.so".

1 Like

I have to look into that later but the PR moves these files I think.
What it does though is build a new .so, as the old ones were ancient and maybe not even stemming from travis.

Does using adb or an Emulator help? If we had a native crash, that would be “good”

@Ali_RS @Darkchaos, in my case my game is not crashing, but I think it might be because I am using .wav files for sound.
I will do a test with ogg files and see if there is a different out come.
Thanks for your response so far.

Ogg is a different library, wavs should only need openAL

FYI, I was using an ogg file in my test.

@ndebruyn any news?

btw, I have already opened a GitHub issue for this

I hope it gets resolved before 3.3 stable release.

1 Like

Hi @Ali_RS,

Sorry I have no idea what is wrong here.

3.3.0-stable is out now and it is still a problem.

1 Like

Yeah, unfortunately. The build script has not fixed yet and I do not know how to fix it. Folks need to use older version of jme3-android-native.jar for now.

@RiccardoBlb can we config build script to use the old prebuilt android natives (that we were using in JME 3.2 and it was working fine) and not build them by CI?

It seems that the new one built by CI has issues. At least it does not work for me and ndebruyn.

1 Like

So @Ali_RS,
Does it work for you to replace the new jme3-android-native.jar with the old one?
It would be awesome if it does and what features will I lose if I use the old jar?