I've been having issues when I stop and start a SoundEffectInstance quicker than the length of that sound. The following code snippet is sometimes called repeatedly for a while every 0.5s while the sound is 1s long:
AttackSound?.Stop(); AttackSound?.Play();
Essentially I want to cancel the previous SoundEffectInstance and stop it from playing, then restart it from the start. However, when I do this the SoundEffectInstancePool slowly fills up the list to 256 of that SoundEffectInstance, causing it to throw an InstancePlayLimitException at me. This only happens when the time between calls to the previous code snippet is shorter than the sound effect itself and it's called repeatedly for a while.
What version of MonoGame does the bug occur on:
What operating system are you using:
What MonoGame platform are you using:
I've been having issues when I stop and start a SoundEffectInstance quicker than the length of that sound. The following code snippet is sometimes called repeatedly for a while every 0.5s while the sound is 1s long:
AttackSound?.Stop(); AttackSound?.Play();Essentially I want to cancel the previous SoundEffectInstance and stop it from playing, then restart it from the start. However, when I do this the SoundEffectInstancePool slowly fills up the list to 256 of that SoundEffectInstance, causing it to throw an InstancePlayLimitException at me. This only happens when the time between calls to the previous code snippet is shorter than the sound effect itself and it's called repeatedly for a while.
What version of MonoGame does the bug occur on:
What operating system are you using:
What MonoGame platform are you using: