是否可以使用 MPMediaPickerController 从库加载音频文件并保存到文档目录?

发布于 2024-09-13 08:12:54 字数 93 浏览 0 评论 0 原文

是否可以使用 MPMediaPickerController 从库加载音频文件并保存到文档目录?

欢迎任何评论。

谢谢

KS

Is it possible to use MPMediaPickerController to load audio files from library and save to document directory?

Welcome any comment.

Thanks

KS

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

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

发布评论

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

评论(2

少女七分熟 2024-09-20 08:12:54

我知道这个问题已经有几个月了,但是 iOS 4.0 及更高版本确实提供了通过 AVAssetExportSession 类。

AVAssetExportSession 有一些缺点,因此我建议任何想要导入文件而无需将其全部转码为 AAC 的人查看 TSLibraryImport

如果满足以下条件,也可以使用 AVAssetReader您有兴趣直接访问未压缩的线性 PCM 数据,而不必先复制文件,然后使用 Core Audio 访问数据。

I know this question is a few months old, but iOS 4.0 and later do provide the ability to copy a song from the iPod library to your application's documents directory via the AVAssetExportSession class.

There are a few drawbacks with AVAssetExportSession, so I would recommend that anyone wanting to import files without having to transcode them all to AAC have a look at TSLibraryImport.

AVAssetReader can also be used if you're interested in directly accessing un-compressed linear PCM data without having to first copy the file and then using Core Audio to access the data.

〃温暖了心ぐ 2024-09-20 08:12:54

您已经实现了 MPMediaPickerControllerDelegate 协议的 mediaPicker:didPickMediaItems: 函数。
我认为,您可以根据需要将所选数据保存在那里。

You have implement the MPMediaPickerControllerDelegate protocol's mediaPicker:didPickMediaItems: function.
I think, you could save the picked data there as you desire.

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