对于与 AVAudioPlayer 一起使用的比 .aiff 更小的文件,是否有更好的选择?
我正在使用 AVAudioPlayer 在我的应用程序中播放简短的一两个音节单词。目前有 250 个 .aiff 文件,每个文件大约为 88KB 到 125KB。目前我的 ipa 文件大小为 29Megs,我正在尝试找到减小大小的最佳方法,以便用户无需有 wifi 即可下载它。
每个声音片段的长度为 1 到 2.5 秒。我不需要暂停、倒带、快进等。
根据我到目前为止读到的内容,AVAudioPlayer 只播放 aiff、wav 或 caf,而且这些都没有被压缩。关于我能做什么有什么建议吗?谢谢。
I'm using AVAudioPlayer to play a short one or two syllables word in my app. Currently there are 250 .aiff files and each of the file is roughly 88KB to 125KB each. Currently my ipa file is at 29Megs and I am trying to find the best way to reduce the size so user don't have to have a wifi to download it.
Each of the sound clip is 1 to 2.5 seconds long. I don't need to pause, rewind, fast forward etc.
Based on what I read so far AVAudioPlayer only play aiff, wav or caf and none of those are compressed. Any recommendation on what I can do? Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
CAF 文件可以使用有损或无损算法进行压缩。如果您使用命令行
afconvert
实用程序进行转换,您可以尝试:还有一个 -b 参数,允许您设置输出比特率,以及一堆其他选项。手册页基本上是空的,但 QA1534 中列出了完整的可能性。
CAF files can be compressed, using either lossy or lossless algorithms. If you're using the command line
afconvert
utility to convert, you could try:There's also a -b parameter that allows you to set the output bit rate, and a bunch of other options. The man page is basically empty but the full array of possibilities are listed in QA1534.