मुझे एक ही समस्या से संबंधित कई प्रश्न हैं, लेकिन this one's सुझावों के बाद, मैं कुछ समस्याओं में भाग लेता हूं।मैं AVQueuePlayer में ध्वनियों की कतार कैसे लूप करूं?
मेरे पास सबकुछ स्थापित है लेकिन जब भी मैं केएमटीटाइमेज़रो का उपयोग करता हूं तो मुझे माच त्रुटियों में मिलता है।
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
@ किंगपोलीगॉन, AVQueuePlayer लूप बनाने के लिए आपने क्या किया? – Raphael