Open Tsayper opened 3 weeks ago
That is odd. Just to rule some things out... is it the same file that is failing? If you move that to the first sound played does it still fail?
That is odd. Just to rule some things out... is it the same file that is failing? If you move that to the first sound played does it still fail?
no, sounds are played in semi-random order (dependent on the user's actions). And 41th player onwards dont play sound (return immediately after await PlayAsync
is called), while the first 40 players continue to work.
If you stick a try catch
around the call to PlayAsync and stick a breakpoint in the catch does it tell you anything?
@Tsayper I would expect this to be related to resource starvation. 40 players means 40 handles to unmanaged resources.
Have you tried disposing of the player instance after playing a sound and only keeping a single player reference like I suggested in my answer to your Stack Overflow question on this issue?
@ewerspej that is a very good point! If this is happening on Android hopefully you might see some vaguely helpful ADB log entries confirming that some resources couldn't be allocated
I'm creating an Android app which should play many different sounds, and using Plugin.Maui.Audio for this purpose. The problem is, when i load a 41st sound, it wont play. No exception is thrown, just silence. Code: