CNA-GAP-046: CNA has no sound-instance limit: InstancePlayLimitException is declared but never thrown
Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit 009d40f5; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.
XNA throws InstancePlayLimitException when too many sound instances play and SoundEffect.Play returns false for it; CNA declares the type but no code path raises it.
- Identifier
CNA-GAP-046- Category
- Functional gap
- Subsystem
- Audio & media
- Status
- Open
- Verified against
- CNA
009d40f5(009d40f5dd085c4e674d3479675fac84b12b3e0a) - Evidence basis
- Source-verified: read at TARGET, not executed
- Tests touching this area
- Yes: see Current tests
- Affected contract
- SoundEffectInstance::Play(), SoundEffect::Play() and InstancePlayLimitException
Expected behaviour
In XNA 4.0, SoundEffectInstance.Play throws InstancePlayLimitException at the platform's voice limit, and SoundEffect.Play catches it and returns false.
Actual behaviour at TARGET
InstancePlayLimitException.hpp declares the type; a grep of the modules finds no throw site, only the type tests in AudioExceptionsTests.cpp. CNA plays instances until the mixer runs out of tracks, which reports a failure differently. The stale SoundEffect::Play documentation that still promises a false return at the limit is part of CNA-BUG-222.
Source locations
modules/audio/include/Microsoft/Xna/Framework/Audio/InstancePlayLimitException.hpp— declared, never thrownmodules/audio/src/Xna/SoundEffect.cpp— SoundEffect::Play: no limit check
Evidence
Checked by grepping the TARGET modules for InstancePlayLimitException and reading SoundEffect.cpp at 009d40f5; not executed.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
AudioExceptionsTests.cpp checks the exception's type hierarchy and message only.
Regression test
If a limit is added, a test that exceeds it and expects the exception (and SoundEffect::Play returning false).
Blast radius
Games that rely on the limit to cap simultaneous sounds; CNA keeps starting instances.
Workaround
Cap simultaneous instances in the game.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- User guide
- Audio: overview
- Known issues
- Functional gap index