OpenAL 随机停止播放某些声音,只能通过重新启动来修复

发布于 2025-01-07 21:15:11 字数 1127 浏览 0 评论 0原文

应用程序: 两款 Cocos2d 通用 iOS 游戏,拥有庞大的客户群。

问题:几个月前(2011 年)开始收到报告,声音会随机消失,只有某些声音会在应用程序中播放,其他声音则不会。此问题只能通过设备重新启动来解决。

重要说明和信息详细信息:

  • 相同的代码和相同的声音文件可以正常播放一年多 没有此类错误报告。我希望我能确定一个日期,但我 相信问题是由 iOS 更新引起的。

  • 该错误非常难以重现。我亲眼所见 一次,但我没有运气再次造成它。然而我们还是1-2 每天都会收到一封涉及相同问题的支持电子邮件,其中一些来自 形成差评。如果我必须从空中找出一个数字,我会 我猜我们看到的发病率为千分之一。看来也许更多 在 iPad 上很常见,但我不确定。

  • 重新启动设备是解决问题的唯一方法。 重新启动应用程序没有任何作用,删除应用程序并重新安装 什么都不做,必须关闭电源然后重新打开。

  • 几周前,为了盲目修复,我放弃了 Cocos2d 声音引擎并将其中一个应用程序切换到 ObjectAL(另一个 基于 openAL 的声音引擎),希望它可以解决这个问题。 事实并非如此,同样的问题正在发生。正如您所注意到的,这两个 只是 OpenAL 的接口。

  • 声音文件本身是使用以下命令从 wavs 转换为 cafs 的 苹果推荐的方法( https://developer.apple.com/library/ios/#codinghowtos /AudioAndVideo/_index.html ),尽管我们还使用了 -c 1 标志使它们成为单声道。

  • 需要澄清的是,该错误与通常的声音无关 问题(静音开关、音量)。部分声音仍在继续 玩得很好,但在设备恢复之前它们将永远不会再次播放 断电并重新启动。

如果有人对我有任何想法,我将非常感谢您的帮助。我在这里束手无策,试图修复一个我无法重新创建的持续错误,这似乎是由我无法控制的事情引起的。

THE APPS: Two Cocos2d universal iOS games with a large customer base.

THE PROBLEM: Several months back (in 2011) reports started coming in, sounds would randomly cut out, only some of the sounds would play in the app, others wouldn’t. This problem can ONLY be fixed by a device reboot.

IMPORTANT NOTES & DETAILS:

  • The SAME code and SAME sound files played fine for over a year with
    NO bug reports of this sort. I wish I could pinpoint a date, but I
    believe the problem started with an iOS update.

  • The bug is incredibly hard to reproduce. I have personally seen it
    once, but I have had no luck causing it again. Yet we get 1-2
    support emails a day with the same issue, some of which come in the
    form a bad reviews. If I had to pull a number out of the air, I’d
    guess we’re looking at a 1 in 1000 incidence. It seems maybe more
    common on the iPad, but I’m not sure.

  • Restarting the device is the ONLY way to fix the problem.
    Restarting the app does nothing, deleting the app and reinstalling
    does nothing, has to be a power down and turn back on.

  • A few weeks ago in an attempt to blindly fix I dumped the Cocos2d
    Sound engine and switched one of the apps over to ObjectAL (another
    openAL based sound engine), hoping it might have fixed the problem.
    It did not, same issue is occurring. As you'd note, both of these
    are just interfaces for OpenAL.

  • The sound files themselves were converted from wavs to cafs using
    Apple’s recommend method (
    https://developer.apple.com/library/ios/#codinghowtos/AudioAndVideo/_index.html
    ), although we also used the -c 1 flag to make them single channel.

  • Just to be clear, the bug has nothing to do with the usual sound
    issues (mute switch, volume). A portion of the sounds continue
    playing fine, but they will never all play again until the device is
    powered down and restarted.

If anyone has any ideas I’d all, I’d be very grateful for the help. I’m at wits end here trying to fix a persistent bug I can’t recreate and that appears to be caused by something outside my control.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉城凉梦凉人心 2025-01-14 21:15:11

正如评论者所说,我在 OpenAL 上也遇到过类似的问题。我们在不同的硬件和不同的操作系统版本上遇到了虚假问题。确实,复制几乎是不可能的。我们发现这个问题的唯一原因是很大比例的用户经历过崩溃或其他严重的音频问题。我们花了几个月的时间试图让它发挥作用,但最终我们遇到的稳定性问题是无法控制的。我们最终选择了另一个库,并将 OpenAL 完全排除在外。我当然不会推荐它用于新项目。

I've had similar problems with OpenAL, as the commenters stated. We had spurious problems on different hardware and on different OS releases. Really, it was nearly impossible to reproduce. The only reason we even found out about the problem was the significant percentage of users who experienced crashes or other severe audio problems. We tried for months trying to make it work, but in the end the stability problems we experienced just weren't manageable. We ended up going with another library and took OpenAL completely out of the picture. I certainly would not recommend it for new projects.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文