我正在尋找一些解決方案,等待SuperpoweredAdvancedAudioPlayer打開文件。我使用ios objective-c應用程序在哪裏我想同時播放多個軌道。但是,當我嘗試以這種方式啓動的軌道:等到文件加載到Superpowered Library
player1->open([[[NSBundle mainBundle] pathForResource:[[tracksNamesBigArray objectAtIndex:row] objectAtIndex:0]ofType:@"mp3"] fileSystemRepresentation]);
player1->play(true);
player2->open([[[NSBundle mainBundle] pathForResource:[[tracksNamesBigArray objectAtIndex:row] objectAtIndex:1] ofType:@"mp3"] fileSystemRepresentation]);
player2->play(true);
player3->open([[[NSBundle mainBundle] pathForResource:[[tracksNamesBigArray objectAtIndex:row] objectAtIndex:2] ofType:@"mp3"] fileSystemRepresentation]);
player3->play(true);
player4->open([[[NSBundle mainBundle] pathForResource:[[tracksNamesBigArray objectAtIndex:row] objectAtIndex:3] ofType:@"mp3"] fileSystemRepresentation]);
player4->play(true);
或當我在功能把這個包,讓這樣的事情:
[self openPlayers:row]
[self playAll];
它不會在同一時間完美地開始播放,一個或2個最後的軌道以.5s-.8s延遲開始(在第一個示例中,延遲大於第二個)。如何等待,直到開放成功,然後開始玩?我沒有在超級電源文檔中找到任何功能。