Saturday, July 30, 2022
HomeGame DevelopmentAn audio engine error that happens solely within the Android Launch model...

An audio engine error that happens solely within the Android Launch model – Cocos Creator


Hello guys?

I discovered a bug that I discovered whereas constructing the beta model of the sport this time, so please share. That is an error that solely happens in Signed APK, not in debug mode.

The replica methodology is straightforward, however by loading two or extra of any AudioClip, it performs indefinitely by way of the scheduler. Then quickly the app crashes.

like this

this.schedule(this.playEffect);

playEffect() {
const audioList = this.assetManager.audioList(-> that is preloaded audio clip array);
for (let i in audioList) {
this.audioManager.playEffect(audioList[i]);
}
}

That is an error that doesn’t happen in debug mode, so it took me a very long time to search out it. I solved it with protection logic, however I believe it is a very large drawback.

I’m utilizing cocos creator model 3.5.2 now.


NewProject_10.zip (172.6 KB)
My take a look at result’s regular, no crash.

To start with, I confirmed that there is no such thing as a drawback with the venture you uploaded, however after we add some sound results which might be being utilized in our recreation to the venture, an error happens once more.

Contemplating this phenomenon, evidently an error happens when a selected sound impact is added, however I don’t know what precisely is the issue.

The construct settings have been modified to the present construct settings of our venture, and the compilation SDK model is 30.

NewProject_10 2.zip (2.9 MB)

I examined slightly extra, however this phenomenon happens even when the compilation SDK is ready to 27, and if I play these two recordsdata(“bead_dragon+”, “bead_event+” ) consecutively among the many connected sound results, I get an error. Hmm… I don’t know what’s particular about these two recordsdata.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments