1
\$\begingroup\$

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.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

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.

\$\endgroup\$
2
  • \$\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\$
    – Bagofsheep
    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\$
    – House
    Feb 27, 2015 at 22:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .