I'm not even sure if the problem is that it's not rewinding properly. I have a Sounds enumerator/class which lets me load all sound effects and then play them at will, and in my game, I initialize them and then each time I want to play one, I play it in its own thread so it doesn't freeze the rest of the game.
The problem is that the first time I hold down or click the mouse to shoot (and thus, play the sound), it plays the sound, even repeatedly, as it's supposed to. But after I release the mouse button and try again, the sound no longer plays.
有谁知道这可能是什么原因?下面是一些代码片段,显示了 Sounds 类和我正在播放声音的代码片段。
声音类:http://pastebin.com/Hqt5dPQ6 播放声音: http: //pastebin.com/Lex9ZmzJ
我感谢任何帮助,因为几个月前我几乎放弃了这个项目,因为由于这个愚蠢的问题我没有取得任何进展。