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
\$\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 '15 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\$ – MichaelHouse Feb 27 '15 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.