如何播放无限重叠的声音?

发布于 2024-09-29 15:45:47 字数 160 浏览 0 评论 0原文

我有一个可以在 iPhone 上触发声音的按钮。我使用 AudioUnit 来最小化延迟。

现在,如果用户点击按钮两次,声音不会重叠,并且第一个触发的声音会被第二个声音切断。有没有一种简单的方法可以让(相同的)声音在用户点击按钮时重叠多次?

谢谢。

安德烈.

I have a button that triggers a sound on an iphone. I am using AudioUnits to minimize the latency.

Right now, if the user taps the button twice, the sound do not overlap and the first triggered sound is cut by the second sound. Is there an easy way to let the (same) sound overlapping as many times as the user taps the buttons?

Thanks.

André.

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

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

发布评论

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

评论(1

梦在深巷 2024-10-06 15:45:47

让 AudioUnit 持续运行,使用短缓冲区来最小化延迟,并在每次点击按钮时开始将声音的另一个副本混合到现有流中。

Leave the AudioUnit running continuously, using short buffers to minimize latency, and start to mix another copy of the sound into the existing stream every time the button is tapped.

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