AudioFileOpenURL的iPod库 [英] AudioFileOpenURL ipod library

查看:204
本文介绍了AudioFileOpenURL的iPod库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想利用图书馆的iPod播放音乐 AudioFileOpenURL ExtAudioFileOpenURL

I want to play music from iPod library using AudioFileOpenURL or ExtAudioFileOpenURL.

CFURLRef fileURL = [mediaItem valueForProperty:MPMediaItemPropertyAssetURL];
AudioFileOpenURL(fileURL,a,b,&id);
//or ExtAudioFileOpenURL

不过,这是行不通的!
我该如何处理呢?谢谢!

But it doesn't work! How can I deal with it?Thank you!

推荐答案

这是行不通的,因为MPMediaItem资产网址只基金AV内有效。您可以使用该资产URL打开一个AVURLAsset,得到一个AVAssetReader等​​,但使用任何接口CoreAudio的你不能打开它。

This isn't going to work because MPMediaItem asset URLs are only valid within AV Foundation. You can use that asset URL to open an AVURLAsset, get an AVAssetReader, etc., but you can't open it using any CoreAudio interfaces.

退房AV基金会编程指南更多信息 - 尤其是你想看看AVPlayer,朋友们:

Check out the AV Foundation programming guide for more info - in particular, you'll want to check out AVPlayer and friends:

<一个href=\"http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/00_Introduction.html\" rel=\"nofollow\">http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/00_Introduction.html

这篇关于AudioFileOpenURL的iPod库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆