AudioFileOpenURL的iPod库 [英] AudioFileOpenURL ipod library
问题描述
我想利用图书馆的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屋!