操作系统:Android
Cocos版本: 3.15.1 JS
没有上下文和复现方式,无法判断哪里的问题。
我最近仔细研究了一下 基本上AudioDecoder: Interleave (assets/res/sound/heroDialogue/10002_3.mp3)闪退的前一句都是这个 因为文件不一样 可以确定的时候wav不会
我感觉使用3.15.1的游戏上线以后 肯定很多都会遇到这个问题
12-13 20:27:41.193 2323 2423 I AudioDecoderMp3: Original audio info: numChannels: 1, sampleRate: 44100, bitPerSample: 16, containerSize: 16, channelMask: 4, endianness: 2, numFrames: 107136, duration: 2.429388, total size: 214272
16712-13 20:27:41.193 2323 2423 D AudioDecoder: Decoding (assets/res/sound/heroDialogue/10003_1.mp3) to pcm data wasted 23.173000ms
16812-13 20:27:41.193 2323 2423 I AudioDecoder: No need to resample since the sample rate (44100) of the decoded pcm data is the same as the device output sample rate
16912-13 20:27:41.193 2323 2423 D AudioDecoder: Resampling (assets/res/sound/heroDialogue/10003_1.mp3) wasted 0.039000ms
17012-13 20:27:41.198 2323 2423 D AudioDecoder: Interleave (assets/res/sound/heroDialogue/10003_1.mp3) wasted 4.941000ms
这是截取到的闪退前的日志
12-14 07:25:29.028 3067 3067 D PhoneWindow: setVolumeControlStream:mVolumeControlStreamType:3 还有几条日志是这样的
信息太有限了,真的无法判断具体原因。
你可以记录一些日志,判断一下用户的操作行为,尝试重现。
嗯嗯 能否加一下QQ 我把我现在收集到的信息都发给你看一下
发消息给你了。
目测这几个跟std::string有关的bug已经在3.16中修复了:
这个是主要的:
https://github.com/cocos2d/cocos2d-x/pull/17620
建议再合并:
https://github.com/cocos2d/cocos2d-x/pull/17923
https://github.com/cocos2d/cocos2d-x/pull/17748
或者直接拿 3.16中的cocos/audio/android的代码替换一下。
好像是之前发现在21上有啥坑解决不了,就这样取巧了。
但是这个属于AudioEngine内部问题,在3.16中应该是修复的了。
嗯嗯 现在的版本是3.15.1 如果3.16是修复的话 那我就是直接拿 3.16中的cocos/audio/android的代码替换一下 这个BUG就肯定解决了是吧?
嗯,试试先。
我现在用的就是3.16,bugly后台发现很多系统版本都有这个问题,不是在21上才有的,注释这个有效?