以恒定音量播放 iPhone 音频

发布于 2024-09-13 20:46:25 字数 167 浏览 13 评论 0原文

我正在使用 AudioQueue Services 在我的应用程序中播放音频(AQPlayer 借自 Speak Here),我想知道是否可以以恒定的音量播放音频,无论 iPhone 的硬件音量如何。

Apple 的phone.app 键盘就是一个例子,无论您的硬件音量如何,铃声都会以相同的音量播放。

I am using AudioQueue Services to play audio in my app (AQPlayer borrowed from Speak Here) and I would like to know if it is possible to play the audio at a constant volume regardless of the iphone hardware volume.

Apple's phone.app keypad is an example of this, the tones play at the same volume regardless of your hardware volume.

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

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

发布评论

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

评论(1

倾`听者〃 2024-09-20 20:46:25

你可能不应该这样做,人们设置音量是有原因的。


如果你真的认为你必须这样做;一种方法可能是确定硬件音量并按所需的量前置声音以获得相同的音量。 (基本上,如果硬件音量为“5”,并且您希望声音以“8”播放,则必须将声音前置放大“3”。)

You probably shouldn't do that, people set their volume for a reason.


If you really think you must; an approach could possibly be to determine the hardware volume and preamp your sound by the required amount to receive the same volume. (Basically, if the hardware volume is at "5", and you want your sound to play at "8", you have to preamp your sound by "3".)

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