添加了 AudioFileClose 以防止文件句柄耗尽
我在使用 Finch 时遇到了问题 - 我正在打开并再次释放大量声音文件,并且项目中的某个特定点声音将停止加载 - 错误代码形式 ALOpenFileFromURL... 为 43 - 找不到文件... 我最终的解决方案是通过将 AudioFileClose (并保留 fileId 的记录)添加到 Sound.m 中的 dealloc 来确保文件已关闭... 我的解决方案可能不优雅,也许很天真,但现在似乎有效 - 所以我想我会发布它,以防它对其他人有帮助,
谢谢, 罗斯
I encountered a problem using Finch - I was opening and releasing again alot of sound files and a particular point in the project sounds would stop loading - the error code form ALOpenFileFromURL... was 43 - File not found ...
my solution in the end was to make sure that files were closed by adding AudioFileClose (and keeping a record of the fileId) to the dealloc in Sound.m...
my solution is probably not graceful and maybe naive but seems to work for now - so i thought i would post in case it helps anybody else
thanks,
Ross
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个错误,不错的收获!感谢您的报告,该问题已在当前版本中修复。下次您可以直接向错误跟踪器报告错误时,我们会更快注意到它。
That was a bug, nice catch! Thanks for reporting, it’s fixed in the current version. Next time you can report the bug directly to the bug tracker, it will be noticed sooner.