Why am I getting the InstancePlayLimitException when playing several SoundEffects per second despite there being no limit unless programming for mobile? It occurs after only a few seconds of repeated playing. I am using Visual Studio 2013 and MonoGame 3.2.
1 Answer
\$\begingroup\$
\$\endgroup\$
2
Make sure your build target is set correctly. If that is, then attach a debugger to your code. Wrap your sound code in an exception handler and examine the conditions that led to the exception being thrown. With this information, you can either code to avoid those conditions, or depending on the conditions, modify MonoGame to ignore the exception.
-
\$\begingroup\$ The build target is x86, with the conditional compilation symbol set to WINDOWS. The configuration is Active (Debug). As far as I know all of this is correct. If so, how do I go about attaching a debugger to my code? \$\endgroup\$ Commented Feb 25, 2015 at 3:12
-
\$\begingroup\$ There's lots of tutorials online for such a task. It's certainly too large of a topic to address in the comments. \$\endgroup\$– HouseCommented Feb 27, 2015 at 22:07