So che esistono più domande relative allo stesso problema, ma dopo aver seguito i suggerimenti this one's, ho riscontrato un paio di problemi.Come si esegue il ciclo della coda di suoni in AVQueuePlayer?
Ho tutto configurato, ma riesco a errori mach ogni volta che uso kMTTimeZero.
soundQueue = [AVQueuePlayer queuePlayerWithItems:soundEmotions];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(playerItemDidReachEnd:)
name:AVPlayerItemDidPlayToEndTimeNotification
object:[soundEmotions lastObject]];
Ecco cosa ho fatto.
- (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)
Grazie! Ho aggiunto il framework e lo sviluppo è perfetto, ma per qualche motivo continua a non riprodurre il suono. Non lo sto facendo correttamente? Grazie! – KingPolygon
L'ho capito! Grazie comunque! – KingPolygon
@KingPolygon, che cosa hai fatto per rendere il ciclo AVQueuePlayer? – Raphael