iOS/OSX 上的 OpenAL 音频质量较差

发布于 2025-01-02 14:09:57 字数 317 浏览 1 评论 0原文

我发现自己正在将一款旧的多媒体游戏移植到 iOS/OSX,但我对通过 OpenAL 实现的音频输出质量有些失望,因为当 PCM 重新采样不佳时,人们会听到“刺耳”的质量。然而,我以 11025KHz 为其提供 8 位 PCM,并且我确实相信本机速率为 44100KHz,所以我无法想象为什么会发生除了样本的 1:4 积分扩展之外的任何情况。在 Win32 系统上播放时声音本身非常干净,所以我知道数据本身没有问题。也不存在任何缓冲问题,因为我在播放位置之前保留了大约 32K 的缓冲。但音质并不是那么好。有其他人遇到过这个问题吗?是否有配置选项可以解决这个问题?我已经浏览了文档,似乎没有任何内容适用于该问题......

I find myself porting an old multimedia title to iOS/OSX and I'm somewhat disappointed with the quality of audio output I've achieved via OpenAL, in that it's got that "scratchy" quality one hears when PCM is resampled poorly. However, I'm feeding it 8-bit PCM at 11025KHz and I do believe the native rate is 44100KHz so I can't imagine why anything other than a 1:4 integral expansion of the samples would be occurring. The sound itself is very clean when played back on a Win32 system so I know there's no problems with the data itself. Nor are there any buffering problems in that I'm keeping about 32K buffered ahead of the playback position. But the sound quality just isn't that good. Has anyone else encountered this and are there configuration options to work around it? I've gone through the docs and nothing seems applicable to the problem ...

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

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

发布评论

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

评论(1

深者入戏 2025-01-09 14:09:57

iOS 不能很好地处理 8 位数据。尝试将其转换为 16 位。

afconvert -f caff -d LEI16@11025 sourcefile.wav destfile.caf

您还可以将其压缩为 mp3 或 aac,但这加载起来稍微复杂一些,因为加载时需要将其转换为 16 位小端格式。

这是一个处理任何 16 位音频格式的加载器: https://github.com/kstenerud/ObjectAL-for-iPhone/blob/master/ObjectAL/ObjectAL/Support/OALAudioFile.m

iOS doesn't handle 8-bit data very well. Try converting it to 16-bit.

afconvert -f caff -d LEI16@11025 sourcefile.wav destfile.caf

You could also compress it to mp3 or aac, but that's a little more complicated to load since it needs to be converted to 16-bit little endian format when loaded.

Here's a loader that handles any 16-bit audio format: https://github.com/kstenerud/ObjectAL-for-iPhone/blob/master/ObjectAL/ObjectAL/Support/OALAudioFile.m

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