I looking for some solution for waiting until SuperpoweredAdvancedAudioPlayer open the file. I make ios objective-c application where I want to play multiple tracks at the same time. But when I try start tracks in this way:
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);
or when I wrap this in functions and make something like this:
[self openPlayers:row]
[self playAll];
It doesn't start play perfectly in the same time, one or 2 last tracks starts with .5s-.8s delay(in first example delay is larger than in second). How to wait until open is successful and then start to play? I did't find any function for that in superpowered documentation.