Xamarin-Plugins icon indicating copy to clipboard operation
Xamarin-Plugins copied to clipboard

issue playing sound from array of players in loop

Open elbonito opened this issue 3 years ago • 1 comments

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 avatar Jun 21 '22 11:06 elbonito

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

elbonito avatar Aug 16 '22 03:08 elbonito