私は同じ問題に関する複数の質問があることを知っていますが、this one'sの提案に続いて、私はいくつかの問題にぶつかります。AVQueuePlayerでサウンドキューをループするにはどうすればいいですか?
私はすべてセットアップしましたが、私はkMTTimeZeroを使うたびにマッハエラーに遭遇します。
soundQueue = [AVQueuePlayer queuePlayerWithItems:soundEmotions];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(playerItemDidReachEnd:)
name:AVPlayerItemDidPlayToEndTimeNotification
object:[soundEmotions lastObject]];
これは私がやったことです。
- (void)playerItemDidReachEnd:(NSNotification *)notification {
// Do stuff here
NSLog(@"End has been reached.");
// Set it back to the beginning
[soundQueue seekToTime:kCMTimeZero];
//Replay
[soundQueue play];
}
ERROR: Undefined symbols for architecture armv7: "_kCMTimeZero", referenced from: -[ViewController playerItemDidReachEnd:] in ViewController.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
ありがとうございました!私はフレームワークを追加し、それはうまく構築されますが、何らかの理由でサウンドをループしません。私はそれを正しくしていませんか?ありがとう! – KingPolygon
私はそれを考え出した!ありがとう、結構です! – KingPolygon
@ KingPolygon、あなたはAVQueuePlayerループを作るために何をしましたか? – Raphael