当前位置:网站首页>Unity3d C#开发微信小游戏音频/音效播放问题解决过程分享
Unity3d C#开发微信小游戏音频/音效播放问题解决过程分享
2022-06-11 22:51:00 【十幺卜入】
前言
之前我写了一篇u3d转微信小游戏开发教程的博客,收到了很多开发者的回馈,我个人也尽自己最大的能力回复我所知道的,因为插件在公测中,会有很多问题和不稳定的因素;开发中也会经常的要更新插件。很多别人遇到的问题我也遇到了,音频这个问题很多人也在问:

而且我这边也遇到了,最后是通过求助官方解决的。
音频优化
由于导出成WEBGL的游戏,音频处理上存在一定的性能损耗,建议直接调用SDK中的音频API直接控制播放,能达到不错效果。使用微信音频API后音频无需再监听onAudioInterruptionBegin,onAudioInterruptionEnd事件,插件会自动处理。
开发者推荐的方式是SDK播放音频:
问题
我这边没有使用SDK的api播放音频,而是Unity自带的AudioSource播放的形式,可是在Unity端没啥问题,转换后在微信开发者工具中也正常,在真机上运行后所有音频报如下错误:
Loading FSB failed for audio clip “****”.
有人向我提过这个问题,当时我也没法解答这个问题,最后我添加了小游戏开发的客服,并将问题反馈了给他:
今天他联系我告知可以了,我尝试了一下真的可以了:
可能还需要更多测试,但目前看来应该是基本正常了,不然游戏没有音效是很蛋疼的事情。
总结
这个过程好像和平台版本都有关系,毕竟是公测中,存在问题是很正常的,如果大家遇到问题,而且在网上查询不到时,可以联系客服人员,将问题反馈,说不定就能解决大家的问题。
边栏推荐
- Mobile terminal - picture timeline of swipe effect
- Tensorflow [actual Google deep learning framework] uses HDF5 to process large data sets with tflearn
- 习题6-2 使用函数求特殊a串数列和 (20 分)
- Is it too troublesome to turn pages manually when you encounter a form? I'll teach you to write a script that shows all the data on one page
- Unity中使用调用Shell的命令行
- How to do investment analysis in the real estate industry? This article tells you
- 基于模板配置的数据可视化平台
- 习题8-5 使用函数实现字符串部分复制 (20 分)
- Is the product stronger or weaker, and is the price unchanged or reduced? Talk about domestic BMW X5
- SDNU_ ACM_ ICPC_ 2022_ Weekly_ Practice_ 1st (supplementary question)
猜你喜欢

【Day3 文献精读】Asymmetrical time and space interference in Tau and Kappa effects

論文閱讀《Dense Visual SLAM for RGB-D Cameras》

Fastapi 5 - common requests and use of postman and curl (parameters, x-www-form-urlencoded, raw)

Deconstruction of volatile | community essay solicitation

Data visualization platform based on template configuration

The second bullet of in-depth dialogue with the container service ack distribution: how to build a hybrid cloud unified network plane with the help of hybridnet

2022 online summit of emerging market brands going to sea will be held soon advance AI CEO Shou Dong will be invited to attend
Gcache of goframe memory cache

基于模板配置的数据可视化平台

【解决】修改子物体Transform信息导致变换不对称、异常问题的解决方案
随机推荐
Mobile terminal - picture timeline of swipe effect
R7-1 sum of numeric elements of a list or tuple
R7-1 列表或元组的数字元素求和
SDNU_ ACM_ ICPC_ 2022_ Weekly_ Practice_ 1st (supplementary question)
Learn to crawl for a month and earn 6000 a month? Don't be fooled. The teacher told you the truth about the reptile
MATLAB点云处理(二十五):点云生成 DEM(pc2dem)
SecurityContextHolder.getContext().getAuthentication().getPrincipal()获取到的是username而不是UserDetails
PHP+MYSQL图书管理系统(课设)
16 | 浮点数和定点数(下):深入理解浮点数到底有什么用?
小程序启动性能优化实践
Daily question -1317 Converts an integer to the sum of two zero free integers
Inventory | more than 20 typical security incidents occurred in February, with a loss of nearly $400million
Matlab point cloud processing (XXV): point cloud generation DEM (pc2dem)
Xshell不小心按到ctrl+s造成页面锁定的解决办法
Brief introduction to integrity
Cloudcompare source code analysis: read ply file
Three years of college should be like this
Exercise 8-8 moving letters (10 points)
习题9-1 时间换算 (15 分)
Dynamics 365 option set operation