I had entered this as an issue, but it has now been closed and marked "As Designed". I'm pretty confused by this.
https://connect.microsoft.com/feedback/ViewFeedback.aspx FeedbackID=198351&SiteID=226
[Note: You need to be signed into Connect first, before clicking on links to Connect will work.]
So basically, we are supposed to always use the dictionary object to look up a sound that needs played over and over again, instead of creating a Cue object to reference and replay that sound That just doesn't sound right to me.
Has anyone else noticed this issue Is there just something that I'm missing I'd really like to understand why this is "As Designed" I guess.
I have some simple sample code in the issue if anyone wants to take a look and recreate what I'm talking about and maybe give me an explanation of either what I'm doing wrong or why an exception would be considered "As Designed".

Using the Cue object generates exception with multiple .Play calls
riga66
e_LA
L0n3i200n
JohnDough
I'm *no* xact expert.
BUT at an educated guess, I'd guess that its something to do with how the xact project is set up. Ive opened up my project here and the cue has a property - MaximumInstances, which is set to 1. Ive *not* tested it, but what happens if you set it to (say) 10 Do you still get the error
Neil
progames25
Also, even if that had been what was causing the exception. Should you still get an exception in code because you played a sound more times than allowed by the cue I still don't think that's an "As Designed" issue.
So setting MaximumInstances (which sets LimitInstances to True) does not fix the issue. And as Johan pointed out, LimitInstances is set to False by default for a Cue so you'd expected to be able to play it over and over again.
Why do you get an exception using a cue object to replay a sound and why is that by design And why isn't anyone else encountering and complaining about this
I realize the workaround is just to always play repeated sounds by retrieving them over and over again from the sound bank, but I don't like that and don't really feel that's a good design practice. So I'd really like to understand why I can't use a cue object to replay a sound.
InfiniZac
Thanks again.
smogit
The ONLY time you use a cue object is when you have a sound that needs to be paused and resumed.
Otherwise you ALWAYS used the GetCue method of the soundbank to play a sound.
Am I understanding it correctly I guess it just doesn't seem very OO to me. But as long as I understand where the direction is going, I can work around it.