English 中文(简体)
在不同时段举办视听节目
原标题:Play an Audio File and Pause at Various Times on iOS

我说,我有一份音频文件,并收集了该音频文件某些部分的时间信息,即他们的开端和终点。 我想做的是,从一开始,逐部分通过档案处理音频文件。

例如,我要说,我有以下数据:

Segment 1 - startTime: 1.0s, endTime: 3.4s Segment 2 - startTime: 3.4s, endTime: 5.0s Segment 3 - startTime: 7.8s, endTime: 9.5s ...

我想通过按部分分列的音频文件。 它将从1.0条开始进入档案,直到3.4条,然后暂停使用,等待用户发布一个顿。 用户一旦向纽特报,则从3.4至5.0条,然后从7.8至9.5条。

用户还有可能cr动音频(但不限于中间部分的空白),因此,尽管我依次行事,但有可能回到前一部分,在这种情况下,这一过程将重复(例如,如果用户对以前或以后某个部分的担心会到该部分的结束时会暂停使用)。

实现这一目标的最佳途径是什么? 看来,我可以使用AVAudioPlayer,但我看不出一种办法,在时间结束时停下来,而不是反复投票。 AVPlayer and AVPlayer 项目看起来是另一种可能性,但如果我理解文件,那么在......我假定我需要处理替换AVPlayerItem的问题,以便发挥ru的作用。

Are there any suggestions about how to best accomplish this goal?

问题回答

我的头顶部,要么把档案分解成个别部分,在理想时间发挥这些作用,要么放弃使用AVAudioPlayer的功能[(你的音响角色名称);然后,当Tton与[(我们的音响角色名称]交火时,恢复游戏];





相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签