将MPMediaPicker选项用作AVAudioPlayer输入 [英] Use MPMediaPicker selections as AVAudioPlayer inputs

查看:143
本文介绍了将MPMediaPicker选项用作AVAudioPlayer输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为听力受损的人编写一个应用程序。我希望从iTunes库中追踪,在我的应用程序有一个滑块来平移。我不想使用OpenAL(这不是一个游戏 - 我重复这是一个媒体播放器)。所以,因为AVAudioPlayer有一个简单的pan方法,我可以从MPMediaPicker选择,并将它们送入AVAudioPlayer,所以我可以平移它们吗?

I'm programming an application for the hearing-impaired. I'm hoping to take tracks from the iTunes library, and in my app have a slider for panning. I don't want to use OpenAL (this isn't a game - I repeat this is a media player). So since AVAudioPlayer has the easy pan method, can I take selections from the MPMediaPicker and feed them into the AVAudioPlayer so I can pan them?

推荐答案


  1. 尝试使AVAMediaPlayer播放变量mediaItemCollection。这是由选择器分配的歌曲位置由上面的代码。如果这不起作用,请确保AVAMediaPlayer使用与MpMediaPicker相同的输入变量类型(格式,如ID或文件夹位置)。

  1. Try having AVAMediaPlayer play the variable mediaItemCollection. This was assigned by the picker to be the song location by the code above. If this does not work make sure that AVAMediaPlayer uses the same input variable type (format, like an ID or a folder location) as MpMediaPicker.

听起来像一个技术问题。我唯一能想到的是,AVAAudio播放器或MPmedia播放器正在寻找一个音量变量(它是必需的?),并找不到一个。我不能真正回答这一个,因为我不做iPhone开发,试试在那里论坛或网站的一些帮助。

That error message sounds like a technical issue. The only thing I can think of is that AVAAudio player or MPmedia player is looking for a Volume variable (it is required?) and can't find one. I can't really answer this one as I don't do iPhone Development, try there forums or website for some help.

听起来你做得很好!如果你有兴趣,(我不知道你是否住在DA)Cochran先生(高中学生的院长)正在教一个iPhone开发课和AP计算机科学课(我在)。如果你想进一步,或者你只想问问题,我知道他也很高兴!

Sounds like you are doing a good job! If you are interested, (I don't know if you are staying at DA) Mr. Cochran (the dean of students at the Upper School) is teaching a iPhone Development Class and a AP Computer Science Class (I am in). If you want to take it further, or you want to just ask questions I know he is more than happy too!

祝你好运!告诉我什么时候完成,所以我可以测试的结果!

Good Luck! Tell me when it is finished so I can test the results!

这篇关于将MPMediaPicker选项用作AVAudioPlayer输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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