Kin*_*gon 5 objective-c avaudioplayer ios avqueueplayer
我知道存在关于同一问题的多个问题,但在遵循这个建议之后,我遇到了一些问题.
我已经完成了所有设置但每次使用kMTTimeZero时我都会遇到马赫错误.
soundQueue = [AVQueuePlayer queuePlayerWithItems:soundEmotions];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(playerItemDidReachEnd:)
name:AVPlayerItemDidPlayToEndTimeNotification
object:[soundEmotions lastObject]];
Run Code Online (Sandbox Code Playgroud)
这就是我所做的.
- (void)playerItemDidReachEnd:(NSNotification *)notification {
// Do stuff here
NSLog(@"End has been reached.");
// Set it back to the beginning
[soundQueue seekToTime:kCMTimeZero];
//Replay
[soundQueue play];
}
Run Code Online (Sandbox Code Playgroud)
错误:架构armv7的未定义符号:"_kCMTimeZero",引用自: - ViewController中的[ViewController playerItemDidReachEnd:] ld:未找到架构armv7 clang的符号:错误:链接器命令失败,退出代码为1(使用 - v看看调用)
| 归档时间: |
|
| 查看次数: |
2494 次 |
| 最近记录: |