Playing soundeffect causes game to crash on Nouget 7.0

JOAOSerraJOAOSerra PTMember ✭✭
edited June 12 in CocosSharp

I'm having trouble with sound effects, seems every time i try to play a sound effect it causes the game to crash, can someone please confirm this happens on the latest Android version?

I do these on my GameDelegate:
CCAudioEngine.SharedEngine.PreloadEffect("Sounds/dimension");
CCAudioEngine.SharedEngine.PreloadEffect("Sounds/explosion");
CCAudioEngine.SharedEngine.EffectsVolume = 1.0f;

then I try to run this:
CCAudioEngine.SharedEngine.PlayEffect("Sounds/explosion", false);

This is really easy to test, just get fruityfalls and try it:
https://developer.xamarin.com/samples/mobile/FruityFalls/

Im using a Samsung galaxy s8.
Its a really annoying bug and since it seems cocossharp is dead i dont have much of a hope to get any assistence :(

The music works fine.

--EDIT--
It seems the problem only happens when in Debug

Tagged:

Answers

  • Naoki95957Naoki95957 USMember
    edited August 2

    I ran into the same issue and you're a life saver for getting me past that. But it turns out that it can run deeper than just the mode you're in. I was running into this problem when trying to deploy my application with multiple architectures.

    I'm still aimlessly trying to figure out how to get it to archive with the apk correctly.

    It's frustrating me that the release deploy works and the apk install doesn't with the same build. Sound effects will run and it's normal when being deployed to my phone. Sometimes the apk wont let me install and sometimes it does, but then the app crashes when trying to play sound effects. I am lost lol

  • Naoki95957Naoki95957 USMember

    Just so you're tracking along with me here, the place where you can add or remove architectures is by double clicking properties in the android project of the solution, then going to Android options and Advanced. From there you can select supported architectures. I'm having issues with all but x86 and armeabi-v7a which is what I've had to settle with

Sign In or Register to comment.