Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue playing sound from array of players in loop #100

Open
elbonito opened this issue Jun 21, 2022 · 1 comment
Open

issue playing sound from array of players in loop #100

elbonito opened this issue Jun 21, 2022 · 1 comment

Comments

@elbonito
Copy link

have issues playing in loop first 2 playe in array play sound but after no sound
i.e.
isimpleraudioplayer[] players = new isimpleaudioplayer[12]
for(int i = 0; i < 12; i++)
{
players[i] = CrossSimpleAudioPlayer.CreateSimpleAudioPlayer();
players[i].Loop = false;
}

players[0].Load(GetStreamFromFile("pathtofile"));
......
players[11].Load(GetStreamFromFile("pathtofile"));

count=0;
ontimer(){ //persecond
players[count].play();
if(count ==12)count=0;
}
and every cycle doesnt matter where i start the array of players like set count to 5, it will only play the sound from 2.

@elbonito
Copy link
Author

playing multiple sounds simultaneously seems to work in android emulator, but having issues in uwp.. will test in ios soon..
same code as above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant