Znam wiele pytań dotyczących tego samego problemu, ale po następujących sugestii this one's napotykam na kilka problemów.Jak zapętlić kolejkę dźwięków w AVQueuePlayer?
Mam wszystko skonfigurowane, ale dostaję się do błędów mach za każdym razem, gdy używam kMTTimeZero.
soundQueue = [AVQueuePlayer queuePlayerWithItems:soundEmotions];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(playerItemDidReachEnd:)
name:AVPlayerItemDidPlayToEndTimeNotification
object:[soundEmotions lastObject]];
Oto, co zrobiłem.
- (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)
Dziękujemy! Dodałem framework i gra się dobrze, ale z jakiegoś powodu wciąż nie zapętlał dźwięku. Czy nie robię tego poprawnie? Dzięki! – KingPolygon
Wymyśliłem! Ale dziękuję! – KingPolygon
@KingPolygon, co zrobiłeś, aby utworzyć pętlę AVQueuePlayer? – Raphael