cocos2dx 3.13.1 华为畅享5 播放较短音效时,会导致崩溃闪退,怎么解决

12-16 09:42:36.755: E/ZQSDK(29352): The config of the ZQSDK is not support plugin type:5
12-16 09:42:36.756: E/ZQSDK(29352): The config of the ZQSDK is not support plugin type:9
12-16 09:42:36.756: E/ZQSDK(29352): The config of the ZQSDK is not support plugin type:3
12-16 09:42:36.757: E/ZQSDK(29352): The config of the ZQSDK is not support plugin type:4
12-16 09:42:36.757: E/ZQSDK(29352): The config of the ZQSDK is not support plugin type:7
12-16 09:42:36.758: E/ZQSDK(29352): The config of the ZQSDK is not support plugin type:8
12-16 09:42:37.166: E/(29352): logPower_print not support
12-16 09:42:37.288: E/APEExtractor(29352): getAPEInfo not ape 502f
12-16 09:42:37.289: E/AsfParser(29352): unknown object: 3334449-0-0-0023545353450000, 3840 bytes
12-16 09:42:37.289: E/AsfParser(29352): error parsing header: -6
12-16 09:42:37.292: A/OMXCodec(29352): frameworks/av/media/libstagefright/OMXCodec.cpp:1364 CHECK_EQ( (int)err,(int)OK) failed: -61 vs. 0
12-16 09:42:37.292: A/libc(29352): Fatal signal 6 (SIGABRT), code -6 in tid 30449 (ALooper)

麻烦提供一下这个短音效,谢谢。

Sound.rar (323.2 KB)

@zws19900512, 播放Sound.rar中的每个音频都会出现崩溃么 ?

对你先试一下x011

但是把这些音效时间加长的话,就不会崩溃了

好的,我会在下午查一下。目测这个堆栈,是挂在系统代码里面了。

好的,尽快帮我解决,谢谢

之前还有一台红米手机也出现这种问题

@zws19900512, 我在MX3上测试了 x011 ,并没有崩溃啊。

华为畅享5上,会蹦,其他的没有崩溃

645263396我qq号

我的是红米note 4 ,手机系统升级一次后,使用AudioEngine:play2d 就奔溃,只能切换回SimpleAudioEngine

1赞

我们也碰到这个问题 也不好定位 引擎那边有没有什么方法避免这个问题呢?

你用的什么格式?

是不是要换成ogg格式

所有格式都试过了, 都奔溃,奇怪的是只是部分机型会,只要调用了AudioEngine:play2d

把cocos/audio/android/AudioPlayerProvider.cpp中的

static AudioFileIndicator __audioFileIndicator[] = {
{“default”, 128000}, // If we could not handle the audio format, return default value, the position should be first.
{".wav", 1024000},
{".ogg", 128000},
{".mp3", 160000}
};

把160000改为1,
测试不会崩掉,但是这样一来,在android6.0及以上系统下,就会出现卡顿现象,希望引擎赶紧修复这一bug

我在华为5s上也遇到这个情况,长时间的音乐,如果是mp3格式的,则不会崩溃;如果是短时间的mp3格式声音,则一定会崩溃.ogg格式的暂时没有发现这个问题. 同样的代码,则在红米手机上,不会出现这种情况

引擎层面这个bug可以修复吗?